Skip to content

Commit

Permalink
updated to androidx.media3 and others
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Feb 5, 2024
0 parents commit 895b59e
Show file tree
Hide file tree
Showing 1,222 changed files with 113,103 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .directory
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Dolphin]
Timestamp=2024,2,5,7,26,48.63
Version=4
ViewMode=1

[Settings]
HiddenFilesShown=true
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Settings in .editorconfig should match checkstyle config

root = true

[*]
charset = utf-8
max_line_length = 120
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Bug report
description: Create a report to help us improve existing features
labels: ["Type: Possible bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have used the search function for [**OPEN**](https://github.com/AntennaPod/AntennaPod/issues) issues to see if someone else has already submitted the same bug report.
required: true
- label: I have **also** used the search function for [**CLOSED**](https://github.com/AntennaPod/AntennaPod/issues?q=is%3Aissue+is%3Aclosed) issues to see if the problem is already solved and just waiting to be released.
required: true
- label: I will describe the problem with as much detail as possible.
required: true
- label: If the bug only to occurs with a certain podcast, I will include the URL of that podcast.
required: true
- type: input
id: version
attributes:
label: App version
description: The latest version is different on each device, so we need the actual version number found on the settings screen.
placeholder: x.y.z
validations:
required: true
- type: dropdown
id: source
attributes:
label: Where did you get the app from
multiple: false
options:
- Google Play
- F-Droid
- Other
validations:
required: true
- type: input
id: android_version
attributes:
label: Android version
description: Please mention if you are using a custom rom!
validations:
required: true
- type: input
id: device
attributes:
label: Device model
- type: input
id: first
attributes:
label: First occurred
placeholder: about x days/weeks ago
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. This
2. Then that
3. Then this
4. Etc.
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: After following the steps, what did you think AntennaPod would do?
- type: textarea
id: current
attributes:
label: Current behaviour
description: What did AntennaPod do instead? Screenshots might help. Usually, you can take a screenshot of your smartphone by pressing *Power* + *Volume down* for a few seconds.
- type: textarea
id: logs
attributes:
label: Logs
description: If you are experiencing a crash, including the stacktrace will likely get it fixed sooner. AntennaPod has an `export logs` feature for this.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Help & Support
url: https://forum.antennapod.org/
about: Reduce developer's support workload by asking other users on our forum.
- name: F-Droid Release
url: https://antennapod.org/documentation/general/f-droid
about: Waiting for an update to appear on F-Droid? No need to create an issue, please just be patient!
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Feature request
description: Request a new feature or enhancement
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have used the search function for [**OPEN**](https://github.com/AntennaPod/AntennaPod/issues) issues to see if someone else has already submitted the same feature request.
required: true
- label: I have **also** used the search function for [**CLOSED**](https://github.com/AntennaPod/AntennaPod/issues?q=is%3Aissue+is%3Aclosed) issues to see if the feature was already implemented and is just waiting to be released, or if the feature was rejected.
required: true
- label: I will describe the problem with as much detail as possible.
required: true
- label: This request contains only one single feature, **not** a list of multiple (related) features.
required: true
- type: input
id: version
attributes:
label: App version
description: The latest version is different on each device, so we need the actual version number found on the settings screen.
placeholder: x.y.z
validations:
required: true
- type: dropdown
id: source
attributes:
label: Where did you get the app from
multiple: false
options:
- Google Play
- F-Droid
- Other
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem you may be having, or feature you want
description: Give a brief explanation about the problem that may currently exist
- type: textarea
id: solution
attributes:
label: Suggested solution
description: Describe how your requested feature solves this problem. Try to be as specific as possible. Please not only explain what the feature does, but also how.
- type: textarea
id: screenshots
attributes:
label: Screenshots / Drawings / Technical details
description: If your request is about (or includes) changing or extending the UI, describe what the UI would look like and how the user would interact with it.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Please make sure that you have read our contribution guidelines: https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request -->
144 changes: 144 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Checks

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [master, develop]

jobs:
code-style:
name: "Code Style"
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkstyle
run: |
curl -s -L https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.3.1/checkstyle-10.3.1-all.jar > checkstyle.jar
find . -name "*\.java" | xargs java -Dconfig_loc=config/checkstyle -jar checkstyle.jar -c config/checkstyle/checkstyle.xml
- name: Find PR Base Commit
id: vars
run: |
git fetch origin develop
echo "::set-output name=branchBaseCommit::$(git merge-base origin/develop HEAD)"
- name: Diff-Checkstyle
run: |
curl -s -L https://github.com/yangziwen/diff-check/releases/download/0.0.7/diff-checkstyle.jar > diff-checkstyle.jar
java -Dconfig_loc=config/checkstyle -jar diff-checkstyle.jar -c config/checkstyle/checkstyle-new-code.xml --git-dir . --base-rev ${{ steps.vars.outputs.branchBaseCommit }}
- name: XML of changed files
run: |
curl -s -L https://github.com/ByteHamster/android-xml-formatter/releases/download/1.1.0/android-xml-formatter.jar > android-xml-formatter.jar
git diff --name-only ${{ steps.vars.outputs.branchBaseCommit }} --diff-filter=AM | { grep "res/layout/" || true; } | xargs java -jar android-xml-formatter.jar
test $(git diff | wc -l) -eq 0 || (echo -e "\n\n===== Found XML code style violations! See output below how to fix them. =====\n\n" && git --no-pager diff --color=always && false)
wrapper-validation:
name: "Gradle Wrapper Validation"
needs: code-style
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1

static-analysis:
name: "Static Code Analysis"
needs: code-style
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Lint :app module recursively
run: ./gradlew :app:lintPlayRelease
- name: SpotBugs
run: ./gradlew spotbugsPlayDebug spotbugsDebug 2>&1 | grep -i "spotbugs"

unit-test:
name: "Unit Test: ${{ matrix.variant }}"
needs: code-style
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
matrix:
include:
- variant: "PlayDebug"
base-variant: "Debug"
execute-tests: true
upload-artifact: true
- variant: "PlayRelease"
base-variant: "Release"
execute-tests: true
upload-artifact: false
- variant: "FreeRelease"
base-variant: "Release"
execute-tests: false
upload-artifact: false
steps:
- uses: actions/checkout@v3
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Create temporary release keystore
run: keytool -noprompt -genkey -v -keystore "app/keystore" -alias alias -storepass password -keypass password -keyalg RSA -validity 10 -dname "CN=antennapod.org, OU=dummy, O=dummy, L=dummy, S=dummy, C=US"
- name: Build
run: ./gradlew assemble${{ matrix.variant }}
- name: Test
if: matrix.execute-tests == true
run: ./gradlew test${{ matrix.variant }}UnitTest test${{ matrix.base-variant }}UnitTest
- uses: actions/upload-artifact@v3
if: matrix.upload-artifact == true
with:
name: app-play-debug.apk
path: app/build/outputs/apk/play/debug/app-play-debug.apk

emulator-test:
name: "Emulator Test"
needs: code-style
runs-on: macOS-latest
timeout-minutes: 45
env:
api-level: 30
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Build with Gradle
run: ./gradlew assemblePlayDebugAndroidTest
- name: Android Emulator test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.api-level }}
target: aosp_atd
channel: canary
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: zsh .github/workflows/runEmulatorTests.sh
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-report
path: app/build/reports/androidTests/connected/flavors/PLAY/
27 changes: 27 additions & 0 deletions .github/workflows/close-if-no-reply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Close issue/PR if no reply
on:
schedule:
- cron: '30 1 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
days-before-stale: 7
days-before-close: 7
only-labels: 'Awaiting reply'
stale-issue-label: 'Still awaiting reply'
stale-pr-label: 'Still awaiting reply'
stale-issue-message: "This issue will be closed when we don't get a reply within 7 days."
stale-pr-message: "This PR will be closed when we don't get a reply within 7 days."
labels-to-remove-when-unstale: 'Awaiting reply'
close-issue-label: "Close reason: no reply"
close-pr-label: "Close reason: no reply"
close-issue-message: "This issue was closed because we didn't get a reply for 14 days."
close-pr-message: "This PR was closed because we didn't get a reply for 14 days."
11 changes: 11 additions & 0 deletions .github/workflows/runEmulatorTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/zsh

set -o pipefail

runTests() {
./gradlew connectedPlayDebugAndroidTest connectedDebugAndroidTest \
-Pandroid.testInstrumentationRunnerArguments.notAnnotation=de.test.antennapod.IgnoreOnCi
}

# Retry tests to make them less flaky
runTests || runTests || runTests
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/
target/
build/
**/*.project
**/*.classpath

# Local configuration file (sdk path, etc)
local.properties
.gradle
build.xml

# Backup files
*~

#eclipse project files
.metadata
.settings
#IntelliJ project files
.idea
*.iml
gen-external-apklibs
out
#transifex downloads
contributers.py

# View hierarchy captures
captures
# other
*.odg#
proguard
libs
*.DS_Store
gradle.properties
*.keystore
*.p12
2 changes: 2 additions & 0 deletions .tx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
antennapod.description
antennapod.shortdescription
Loading

0 comments on commit 895b59e

Please sign in to comment.