diff --git a/.github/ISSUE_TEMPLATE/docs_issue.yml b/.github/ISSUE_TEMPLATE/docs_issue.yml new file mode 100644 index 000000000..0a925e2f4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/docs_issue.yml @@ -0,0 +1,38 @@ +name: Documentation issue +description: File an issue or make a suggestion for the project documentation +title: "[Documentation]: " +labels: ["documentation"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to improve our documentation! + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the documentation issue you encountered. + options: + - label: I have searched the existing issues + required: true + - type: input + id: page-url + attributes: + label: Page URL (type "NEW" for a new page suggestion) + validations: + required: true + - type: textarea + id: what-needs-improving + attributes: + label: What's the documentation problem or suggestion? + placeholder: Tell us what should be improved! + value: "Docs need improving!" + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index da9b19682..c38247d23 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -6,7 +6,7 @@ label: 'triage me' Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea -- [ ] Ensure the tests and linter pass (`./gradlew spotlessApply` to automatically apply formatting) +- [ ] Ensure the tests and linter pass (`./gradlew --init-script gradle/init.gradle.kts spotlessApply` to automatically apply formatting) - [ ] Appropriate docs were updated (if necessary) Is this your first Pull Request? diff --git a/.github/ci-gradle.properties b/.github/ci-gradle.properties index 9ba9603f3..bd989705d 100644 --- a/.github/ci-gradle.properties +++ b/.github/ci-gradle.properties @@ -16,11 +16,13 @@ org.gradle.daemon=false org.gradle.parallel=true -org.gradle.jvmargs=-Xmx5120m org.gradle.workers.max=2 kotlin.incremental=false kotlin.compiler.execution.strategy=in-process -# Controls KotlinOptions.allWarningsAsErrors. This is used in CI and can be set in local properties. -warningsAsErrors=true +# Controls KotlinOptions.allWarningsAsErrors. +# This value used in CI and is currently set to false. +# If you want to treat warnings as errors locally, set this property to true +# in your ~/.gradle/gradle.properties file. +warningsAsErrors=false diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 000000000..f19341761 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", "group:all", ":dependencyDashboard", "schedule:daily" + ], + "packageRules": [ + { + "matchPackageNames": ["org.objenesis:objenesis"], + "allowedVersions": "<=2.6" + }, + { + "matchPackageNames": ["com.google.protobuf"], + "allowedVersions": "<=0.8.19" + } + ] +} diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index eaf23e690..54dbcb252 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -16,51 +16,44 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: + distribution: 'zulu' java-version: 11 - - name: Generate cache key - run: ./scripts/checksum.sh checksum.txt - - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches/modules-* - ~/.gradle/caches/jars-* - ~/.gradle/caches/build-cache-* - key: gradle-${{ hashFiles('checksum.txt') }} + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 - name: Check spotless - run: ./gradlew spotlessCheck --stacktrace + run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache --stacktrace - name: Check lint - run: ./gradlew lintDebug --stacktrace + run: ./gradlew lintDemoDebug --stacktrace - - name: Build debug - run: ./gradlew assembleDebug --stacktrace - - - name: Build release - run: ./gradlew assembleRelease --stacktrace + - name: Build all build type and flavor permutations + run: ./gradlew assemble --stacktrace - name: Run local tests - run: ./gradlew testDebug --stacktrace + run: ./gradlew testDemoDebug testProdDebug --stacktrace - name: Upload build outputs (APKs) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build-outputs path: app/build/outputs - name: Upload build reports if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build-reports path: app/build/reports @@ -68,33 +61,26 @@ jobs: androidTest: needs: build runs-on: macOS-latest # enables hardware acceleration in the virtual machine - timeout-minutes: 45 + timeout-minutes: 55 strategy: matrix: api-level: [23, 26, 30] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: + distribution: 'zulu' java-version: 11 - - name: Generate cache key - run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt - - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches/modules-* - ~/.gradle/caches/jars-* - ~/.gradle/caches/build-cache-* - key: gradle-${{ hashFiles('checksum.txt') }} + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 - name: Run instrumentation tests uses: reactivecircus/android-emulator-runner@v2 @@ -102,13 +88,13 @@ jobs: api-level: ${{ matrix.api-level }} arch: x86_64 disable-animations: true - disk-size: 1500M - heap-size: 512M - script: ./gradlew connectedAndroidTest -x :benchmark:connectedBenchmarkAndroidTest + disk-size: 6000M + heap-size: 600M + script: ./gradlew connectedProdDebugAndroidTest -x :benchmark:connectedProdBenchmarkAndroidTest --stacktrace - name: Upload test reports if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: test-reports - path: app/build/reports/androidTests + name: test-reports-${{ matrix.api-level }} + path: '*/build/reports/androidTests' diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index fd5336526..86f88a920 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -12,18 +12,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: + distribution: 'zulu' java-version: 11 - - name: Build all projects - run: ./scripts/gradlew_recursive.sh assembleDebug + - name: Build app + run: ./gradlew :app:assembleDemoRelease - name: Create Release id: create_release @@ -36,72 +40,12 @@ jobs: draft: true prerelease: false - - name: Upload Crane - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: Crane/app/build/outputs/apk/debug/app-debug.apk - asset_name: crane-debug.apk - asset_content_type: application/vnd.android.package-archive - - - name: Upload Owl - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: Owl/app/build/outputs/apk/debug/app-debug.apk - asset_name: owl-debug.apk - asset_content_type: application/vnd.android.package-archive - - - name: Upload Jetcaster + - name: Upload app uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: Jetcaster/app/build/outputs/apk/debug/app-debug.apk - asset_name: jetcaster-debug.apk + asset_path: app/build/outputs/apk/demo/release/app-demo-release.apk + asset_name: app-demo-release.apk asset_content_type: application/vnd.android.package-archive - - - name: Upload Jetchat - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: Jetchat/app/build/outputs/apk/debug/app-debug.apk - asset_name: jetchat-debug.apk - asset_content_type: application/vnd.android.package-archive - - - name: Upload Jetnews - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: JetNews/app/build/outputs/apk/debug/app-debug.apk - asset_name: jetnews-debug.apk - asset_content_type: application/vnd.android.package-archive - - - name: Upload Jetsnack - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: Jetsnack/app/build/outputs/apk/debug/app-debug.apk - asset_name: jetsnack-debug.apk - asset_content_type: application/vnd.android.package-archive - - - name: Upload Jetsurvey - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: Jetsurvey/app/build/outputs/apk/debug/app-debug.apk - asset_name: jetsurvey-debug.apk - asset_content_type: application/vnd.android.package-archive diff --git a/.google/packaging.yaml b/.google/packaging.yaml index 17972dcca..e3b33ada7 100644 --- a/.google/packaging.yaml +++ b/.google/packaging.yaml @@ -19,7 +19,12 @@ --- status: PUBLISHED technologies: [Android] -categories: [Architecture] +categories: + - AndroidTesting + - AndroidArchitecture + - AndroidArchitectureUILayer + - AndroidArchitectureDomainLayer + - AndroidArchitectureDataLayer languages: [Kotlin] solutions: [Mobile] github: android/nowinandroid diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index a24d14540..0a9e39c9d 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -34,14 +34,7 @@