├── .github ├── FUNDING.yml ├── lib │ └── bundletool.jar └── workflows │ ├── android-ci-generate-apk-aab-clean.yml │ ├── android-ci-generate-apk-aab-download.yml │ ├── android-ci-generate-apk-aab-upload-2.yml │ ├── android-ci-generate-apk-aab-upload.yml │ ├── android-ci-publish-play-store.yml │ ├── android-ci.yml │ └── detekt-analysis.yml ├── .gitignore ├── .run ├── _sample.run.xml ├── debug-build-apk.run.xml ├── debug-build-bundle.run.xml ├── release-build-apk.run.xml ├── release-build-bundle.run.xml ├── signingreport.run.xml └── z-build-apk-bundle.run.xml ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── _config.yml ├── action.yml ├── app ├── .gitignore ├── build.gradle.kts ├── frogoboxdev.jks ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── frogobox │ │ └── githubaction │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── frogobox │ │ │ └── githubaction │ │ │ └── MainActivity.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── frogobox │ └── githubaction │ └── ExampleUnitTest.kt ├── build.gradle.kts ├── buildSrc ├── .gitignore ├── build.gradle.kts └── src │ └── main │ └── kotlin │ ├── Dependency.kt │ └── ProjectSetting.kt ├── docs └── image │ ├── bundletool │ ├── ss_bundle_1.png │ ├── ss_bundle_2.png │ ├── ss_bundle_3.png │ ├── ss_bundle_4.png │ └── ss_bundle_5.png │ ├── mad_score.png │ ├── ss-01.png │ ├── ss-02.png │ ├── ss-apk-debug.png │ ├── ss-apk-release.png │ ├── ss-bundle.png │ ├── ss-configuration-01.png │ ├── ss-configuration-02.png │ ├── ss-configuration-03.png │ ├── ss-configuration-04.png │ ├── ss-configuration-05.png │ └── ss-private-repo.png ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── jitpack.yml └── settings.gradle.kts /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: amirisback 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: amirisback 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: https://saweria.co/amirisback 13 | -------------------------------------------------------------------------------- /.github/lib/bundletool.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/.github/lib/bundletool.jar -------------------------------------------------------------------------------- /.github/workflows/android-ci-generate-apk-aab-clean.yml: -------------------------------------------------------------------------------- 1 | name: Generated APK AAB (Clean - Clean chace and artifacts)) 2 | 3 | on: 4 | # Allows you to run this workflow manually from the Actions tab 5 | workflow_dispatch: 6 | 7 | schedule: 8 | # Every day at 1am 9 | - cron: '0 1 * * *' 10 | 11 | jobs: 12 | remove-old-artifacts: 13 | 14 | runs-on: ubuntu-latest 15 | 16 | timeout-minutes: 10 17 | 18 | steps: 19 | - name: Clean all artifacts 20 | uses: c-hive/gha-remove-artifacts@v4 21 | with: 22 | age: '60 seconds' # ' ', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js 23 | # Optional inputs 24 | # skip-tags: true 25 | # skip-recent: 5 -------------------------------------------------------------------------------- /.github/workflows/android-ci-generate-apk-aab-download.yml: -------------------------------------------------------------------------------- 1 | name: (On Research) Generated APK AAB (Download (still in development)) 2 | 3 | env: 4 | # The name of the main module repository 5 | main_project_module: app 6 | 7 | # The name of the Play Store 8 | playstore_name: Frogobox ID 9 | 10 | on: 11 | # Allows you to run this workflow manually from the Actions tab 12 | workflow_dispatch: 13 | 14 | jobs: 15 | build: 16 | 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | 22 | # Set Current Date As Env Variable 23 | - name: Set current date as env variable 24 | run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV 25 | 26 | # Set Repository Name As Env Variable 27 | - name: Set repository name as env variable 28 | run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV 29 | 30 | - name: Set Up JDK 31 | uses: actions/setup-java@v4 32 | with: 33 | distribution: 'zulu' # See 'Supported distributions' for available options 34 | java-version: '17' 35 | cache: 'gradle' 36 | 37 | - name: Change wrapper permissions 38 | run: chmod +x ./gradlew 39 | 40 | # Run Tests Build 41 | - name: Run gradle tests 42 | run: ./gradlew test 43 | 44 | # Run Build Project 45 | - name: Build gradle project 46 | run: ./gradlew build 47 | 48 | # Create APK Debug 49 | - name: Build apk debug project (APK) - ${{ env.main_project_module }} module 50 | run: ./gradlew assembleDebug 51 | 52 | # Create APK Release 53 | - name: Build apk release project (APK) - ${{ env.main_project_module }} module 54 | run: ./gradlew assemble 55 | 56 | # Create Bundle AAB Release 57 | # Noted for main module build [main_project_module]:bundleRelease 58 | - name: Build app bundle release (AAB) - ${{ env.main_project_module }} module 59 | run: ./gradlew ${{ env.main_project_module }}:bundleRelease 60 | 61 | # Download Artifact Build 62 | # Noted For Output [main_project_module]/build/outputs/apk/debug/ 63 | - name: Download APK Debug - ${{ env.repository_name }} 64 | uses: actions/download-artifact@v4.1.7 65 | with: 66 | path: ${{ env.main_project_module }}/build/outputs/apk/debug/ 67 | 68 | - name: Display APK Debug - ${{ env.repository_name }} structure of downloaded files 69 | run: ls -R 70 | working-directory: ${{ env.main_project_module }}/build/outputs/apk/debug/ 71 | 72 | # Noted For Output [main_project_module]/build/outputs/apk/release/ 73 | - name: Download APK Release - ${{ env.repository_name }} 74 | uses: actions/download-artifact@v4.1.7 75 | with: 76 | path: ${{ env.main_project_module }}/build/outputs/apk/release/ 77 | 78 | - name: Display APK Release - ${{ env.repository_name }} structure of downloaded files 79 | run: ls -R 80 | working-directory: ${{ env.main_project_module }}/build/outputs/apk/release/ 81 | 82 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 83 | - name: Download AAB (App Bundle) Release - ${{ env.repository_name }} 84 | uses: actions/download-artifact@v4.1.7 85 | with: 86 | path: ${{ env.main_project_module }}/build/outputs/bundle/release/ 87 | 88 | - name: Display AAB (App Bundle) Release - ${{ env.repository_name }} structure of downloaded files 89 | run: ls -R 90 | working-directory: ${{ env.main_project_module }}/build/outputs/bundle/release/ -------------------------------------------------------------------------------- /.github/workflows/android-ci-generate-apk-aab-upload-2.yml: -------------------------------------------------------------------------------- 1 | name: Generated APK AAB 2 Bundle Tool (Upload - Create Artifact To Github Action) 2 | 3 | env: 4 | # The name of the main module repository 5 | main_project_module: app 6 | 7 | # The name of the Play Store 8 | playstore_name: Frogobox ID 9 | 10 | # Keystore Path 11 | ks_path: frogoboxdev.jks 12 | 13 | # Keystore Password 14 | ks_store_pass: cronoclez 15 | 16 | # Keystore Alias 17 | ks_alias: frogobox 18 | 19 | # Keystore Alias Password 20 | ks_alias_pass: xeonranger 21 | 22 | on: 23 | 24 | push: 25 | branches: 26 | - 'release/**' 27 | 28 | # Allows you to run this workflow manually from the Actions tab 29 | workflow_dispatch: 30 | 31 | jobs: 32 | build: 33 | 34 | runs-on: ubuntu-latest 35 | 36 | steps: 37 | - uses: actions/checkout@v4 38 | 39 | # Set Current Date As Env Variable 40 | - name: Set current date as env variable 41 | run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV 42 | 43 | # Set Repository Name As Env Variable 44 | - name: Set repository name as env variable 45 | run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV 46 | 47 | - name: Set Up JDK 48 | uses: actions/setup-java@v4 49 | with: 50 | distribution: 'zulu' # See 'Supported distributions' for available options 51 | java-version: '17' 52 | cache: 'gradle' 53 | 54 | - name: Change wrapper permissions 55 | run: chmod +x ./gradlew 56 | 57 | # Run Tests Build 58 | - name: Run gradle tests 59 | run: ./gradlew test 60 | 61 | # Run Build Project 62 | - name: Build gradle project 63 | run: ./gradlew build 64 | 65 | # Create APK Debug 66 | - name: Build apk debug project (APK) - ${{ env.main_project_module }} module 67 | run: ./gradlew assembleDebug 68 | 69 | # Create APK Release 70 | - name: Build apk release project (APK) - ${{ env.main_project_module }} module 71 | run: ./gradlew assemble 72 | 73 | # Create Bundle AAB Release 74 | # Noted for main module build [main_project_module]:bundleRelease 75 | - name: Build app bundle release (AAB) - ${{ env.main_project_module }} module 76 | run: ./gradlew ${{ env.main_project_module }}:bundleRelease 77 | 78 | # - name: Build APK(s) Debug from bundle using bundletool 79 | # run: java -jar ".github/lib/bundletool.jar" build-apks --bundle=${{ env.main_project_module }}/build/outputs/bundle/debug/${{ env.artifact_name }}-debug.aab --output=${{ env.main_project_module }}/build/outputs/bundle/debug/${{ env.artifact_name }}-debug.apks --mode=universal 80 | 81 | - name: Set Env Artifact name from generated aab 82 | run: | 83 | cd ${{ env.main_project_module }}/build/outputs/bundle/release/ 84 | files=(*) 85 | echo "generated_name_aab=${files[0]%.*}" >> $GITHUB_ENV 86 | 87 | # Build APK From Bundle Using Bundletool 88 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 89 | - name: Build APK(s) Release from bundle using bundletool (Path same with bundle output) 90 | run: java -jar ".github/lib/bundletool.jar" build-apks --bundle=${{ env.main_project_module }}/build/outputs/bundle/release/${{ env.generated_name_aab }}.aab --output=${{ env.main_project_module }}/build/outputs/bundle/release/${{ env.generated_name_aab }}.apks --mode=universal --ks="app/${{ env.ks_path }}" --ks-pass=pass:${{ env.ks_store_pass }} --ks-key-alias=${{ env.ks_alias }} --key-pass=pass:${{ env.ks_alias_pass }} 91 | 92 | # Duplicate APK(s) Release to zip file and extract 93 | - name: Duplicate APK(s) Release to zip file and extract 94 | run: | 95 | cd ${{ env.main_project_module }}/build/outputs/bundle/release/ 96 | unzip -p ${{ env.generated_name_aab }}.apks universal.apk > ${{ env.generated_name_aab }}.apk 97 | 98 | # Upload Artifact Build 99 | # Noted For Output [main_project_module]/build/outputs/apk/debug/ 100 | - name: Upload APK Debug - ${{ env.repository_name }} 101 | uses: actions/upload-artifact@v4 102 | with: 103 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated 104 | path: ${{ env.main_project_module }}/build/outputs/apk/debug/ 105 | 106 | # Noted For Output [main_project_module]/build/outputs/apk/release/ 107 | - name: Upload APK Release - ${{ env.repository_name }} 108 | uses: actions/upload-artifact@v4 109 | with: 110 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) release generated 111 | path: ${{ env.main_project_module }}/build/outputs/apk/release/ 112 | 113 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 114 | - name: Upload AAB (App Bundle) Release - ${{ env.repository_name }} 115 | uses: actions/upload-artifact@v4 116 | with: 117 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated 118 | path: ${{ env.main_project_module }}/build/outputs/bundle/release/ -------------------------------------------------------------------------------- /.github/workflows/android-ci-generate-apk-aab-upload.yml: -------------------------------------------------------------------------------- 1 | name: Generated APK AAB (Upload - Create Artifact To Github Action) 2 | 3 | env: 4 | # The name of the main module repository 5 | main_project_module: app 6 | 7 | # The name of the Play Store 8 | playstore_name: Frogobox ID 9 | 10 | on: 11 | 12 | push: 13 | branches: 14 | - 'release/**' 15 | 16 | # Allows you to run this workflow manually from the Actions tab 17 | workflow_dispatch: 18 | 19 | jobs: 20 | build: 21 | 22 | runs-on: ubuntu-latest 23 | 24 | steps: 25 | - uses: actions/checkout@v4 26 | 27 | # Set Current Date As Env Variable 28 | - name: Set current date as env variable 29 | run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV 30 | 31 | # Set Repository Name As Env Variable 32 | - name: Set repository name as env variable 33 | run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV 34 | 35 | - name: Set Up JDK 36 | uses: actions/setup-java@v4 37 | with: 38 | distribution: 'zulu' # See 'Supported distributions' for available options 39 | java-version: '17' 40 | cache: 'gradle' 41 | 42 | - name: Change wrapper permissions 43 | run: chmod +x ./gradlew 44 | 45 | # Run Tests Build 46 | - name: Run gradle tests 47 | run: ./gradlew test 48 | 49 | # Run Build Project 50 | - name: Build gradle project 51 | run: ./gradlew build 52 | 53 | # Create APK Debug 54 | - name: Build apk debug project (APK) - ${{ env.main_project_module }} module 55 | run: ./gradlew assembleDebug 56 | 57 | # Create APK Release 58 | - name: Build apk release project (APK) - ${{ env.main_project_module }} module 59 | run: ./gradlew assemble 60 | 61 | # Create Bundle AAB Release 62 | # Noted for main module build [main_project_module]:bundleRelease 63 | - name: Build app bundle release (AAB) - ${{ env.main_project_module }} module 64 | run: ./gradlew ${{ env.main_project_module }}:bundleRelease 65 | 66 | # Upload Artifact Build 67 | # Noted For Output [main_project_module]/build/outputs/apk/debug/ 68 | - name: Upload APK Debug - ${{ env.repository_name }} 69 | uses: actions/upload-artifact@v4 70 | with: 71 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated 72 | path: ${{ env.main_project_module }}/build/outputs/apk/debug/ 73 | 74 | # Noted For Output [main_project_module]/build/outputs/apk/release/ 75 | - name: Upload APK Release - ${{ env.repository_name }} 76 | uses: actions/upload-artifact@v4 77 | with: 78 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) release generated 79 | path: ${{ env.main_project_module }}/build/outputs/apk/release/ 80 | 81 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 82 | - name: Upload AAB (App Bundle) Release - ${{ env.repository_name }} 83 | uses: actions/upload-artifact@v4 84 | with: 85 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated 86 | path: ${{ env.main_project_module }}/build/outputs/bundle/release/ -------------------------------------------------------------------------------- /.github/workflows/android-ci-publish-play-store.yml: -------------------------------------------------------------------------------- 1 | name: (On Research) Android Publish Play Store (Still in development) 2 | 3 | env: 4 | # The name of the main module repository 5 | main_project_module: app 6 | 7 | # The name of the Play Store 8 | playstore_name: Frogobox ID 9 | 10 | on: 11 | push: 12 | branches: 13 | - 'release/**' 14 | 15 | # Allows you to run this workflow manually from the Actions tab 16 | workflow_dispatch: 17 | 18 | jobs: 19 | build: 20 | 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - uses: actions/checkout@v4 25 | 26 | - name: Set Up JDK 27 | uses: actions/setup-java@v4 28 | with: 29 | java-version: 17 30 | 31 | - name: Change wrapper permissions 32 | run: chmod +x ./gradlew 33 | 34 | - name: Run Tests 35 | run: ./gradlew test 36 | 37 | - name: Build Project 38 | run: ./gradlew build 39 | 40 | - name: Build Release AAB 41 | run: ./gradlew bundleRelease 42 | 43 | - name: Sign AAB 44 | uses: r0adkll/sign-android-release@v4 45 | with: 46 | releaseDirectory: app/build/outputs/bundle/release 47 | signingKeyBase64: ${{ secrets.SIGN_KEY }} 48 | alias: ${{ secrets.ALIAS }} 49 | keyStorePassword: ${{ secrets.STORE_KEY_PASSWORD }} 50 | keyPassword: ${{ secrets.KEY_PASSWORD }} 51 | 52 | - name: Deploy to Play Store 53 | uses: r0adkll/upload-google-play@v4 54 | with: 55 | serviceAccountJsonPlainText: ${{secrets.SERVICE_ACCOUNT}} 56 | packageName: com.tomerpacific.laundry 57 | releaseFiles: app/build/outputs/bundle/release/app-release.aab 58 | track: production 59 | -------------------------------------------------------------------------------- /.github/workflows/android-ci.yml: -------------------------------------------------------------------------------- 1 | name: Android CI 2 | 3 | env: 4 | # The name of the main module repository 5 | main_project_module: app 6 | 7 | # The name of the Play Store 8 | playstore_name: Frogobox ID 9 | 10 | on: 11 | # Triggers the workflow on push or pull request events but only for default and protected branches 12 | push: 13 | branches: [ master ] 14 | pull_request: 15 | branches: [ master ] 16 | 17 | # Allows you to run this workflow manually from the Actions tab 18 | workflow_dispatch: 19 | 20 | jobs: 21 | build: 22 | 23 | runs-on: ubuntu-latest 24 | 25 | steps: 26 | - uses: actions/checkout@v4 27 | 28 | # Set Current Date As Env Variable 29 | - name: Set current date as env variable 30 | run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV 31 | 32 | # Set Repository Name As Env Variable 33 | - name: Set repository name as env variable 34 | run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV 35 | 36 | - name: Set Up JDK 37 | uses: actions/setup-java@v4 38 | with: 39 | distribution: 'zulu' # See 'Supported distributions' for available options 40 | java-version: '17' 41 | cache: 'gradle' 42 | 43 | - name: Change wrapper permissions 44 | run: chmod +x ./gradlew 45 | 46 | # Run Tests Build 47 | - name: Run gradle tests 48 | run: ./gradlew test 49 | 50 | # Run Build Project 51 | - name: Build gradle project 52 | run: ./gradlew build -------------------------------------------------------------------------------- /.github/workflows/detekt-analysis.yml: -------------------------------------------------------------------------------- 1 | # This workflow performs a static analysis of your Kotlin source code using 2 | # Detekt. 3 | # 4 | # Scans are triggered: 5 | # 1. On every push to default and protected branches 6 | # 2. On every Pull Request targeting the default branch 7 | # 3. On a weekly schedule 8 | # 4. Manually, on demand, via the "workflow_dispatch" event 9 | # 10 | # The workflow should work with no modifications, but you might like to use a 11 | # later version of the Detekt CLI by modifing the $DETEKT_RELEASE_TAG 12 | # environment variable. 13 | name: Scan with Detekt 14 | 15 | on: 16 | # Triggers the workflow on push or pull request events but only for default and protected branches 17 | push: 18 | branches: [ master ] 19 | pull_request: 20 | branches: [ master ] 21 | schedule: 22 | - cron: '27 4 * * 1' 23 | 24 | # Allows you to run this workflow manually from the Actions tab 25 | workflow_dispatch: 26 | 27 | env: 28 | # Release tag associated with version of Detekt to be installed 29 | # SARIF support (required for this workflow) was introduced in Detekt v1.15.0 30 | DETEKT_RELEASE_TAG: v1.15.0 31 | 32 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 33 | jobs: 34 | # This workflow contains a single job called "scan" 35 | scan: 36 | name: Scan 37 | # The type of runner that the job will run on 38 | runs-on: ubuntu-latest 39 | 40 | # Steps represent a sequence of tasks that will be executed as part of the job 41 | steps: 42 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 43 | - uses: actions/checkout@v3 44 | 45 | # Gets the download URL associated with the $DETEKT_RELEASE_TAG 46 | - name: Get Detekt download URL 47 | id: detekt_info 48 | env: 49 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 | run: | 51 | DETEKT_DOWNLOAD_URL=$( gh api graphql --field tagName=$DETEKT_RELEASE_TAG --raw-field query=' 52 | query getReleaseAssetDownloadUrl($tagName: String!) { 53 | repository(name: "detekt", owner: "detekt") { 54 | release(tagName: $tagName) { 55 | releaseAssets(name: "detekt", first: 1) { 56 | nodes { 57 | downloadUrl 58 | } 59 | } 60 | } 61 | } 62 | } 63 | ' | \ 64 | jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' ) 65 | echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL" 66 | 67 | # Sets up the detekt cli 68 | - name: Setup Detekt 69 | run: | 70 | dest=$( mktemp -d ) 71 | curl --request GET \ 72 | --url ${{ steps.detekt_info.outputs.download_url }} \ 73 | --silent \ 74 | --location \ 75 | --output $dest/detekt 76 | chmod a+x $dest/detekt 77 | echo $dest >> $GITHUB_PATH 78 | 79 | # Performs static analysis using Detekt 80 | - name: Run Detekt 81 | continue-on-error: true 82 | run: | 83 | detekt --input ${{ github.workspace }} --report sarif:${{ github.workspace }}/detekt.sarif.json 84 | 85 | # Modifies the SARIF output produced by Detekt so that absolute URIs are relative 86 | # This is so we can easily map results onto their source files 87 | # This can be removed once relative URI support lands in Detekt: https://git.io/JLBbA 88 | - name: Make artifact location URIs relative 89 | continue-on-error: true 90 | run: | 91 | echo "$( 92 | jq \ 93 | --arg github_workspace ${{ github.workspace }} \ 94 | '. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \ 95 | ${{ github.workspace }}/detekt.sarif.json 96 | )" > ${{ github.workspace }}/detekt.sarif.json 97 | 98 | # Uploads results to GitHub repository using the upload-sarif action 99 | - uses: github/codeql-action/upload-sarif@v1 100 | with: 101 | # Path to SARIF file relative to the root of the repository 102 | sarif_file: ${{ github.workspace }}/detekt.sarif.json 103 | checkout_path: ${{ github.workspace }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | /.gradle 3 | .gradle 4 | .idea 5 | /local.properties 6 | /.idea/libraries 7 | /.idea/modules.xml 8 | /.idea/workspace.xml 9 | .DS_Store 10 | build 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | 15 | built application files 16 | .apk 17 | .ap_ 18 | 19 | files for the dex VM 20 | *.dex 21 | 22 | Java class files 23 | *.class 24 | 25 | generated files 26 | bin/ 27 | gen/ 28 | .externalNativeBuild/ 29 | 30 | Local configuration file (sdk path, etc) 31 | local.properties 32 | app/version.properties 33 | 34 | # SonarQube 35 | .sonar/ -------------------------------------------------------------------------------- /.run/_sample.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 17 | 19 | true 20 | true 21 | false 22 | false 23 | 24 | 25 | -------------------------------------------------------------------------------- /.run/debug-build-apk.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 18 | true 19 | true 20 | false 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /.run/debug-build-bundle.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 18 | true 19 | true 20 | false 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /.run/release-build-apk.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 18 | true 19 | true 20 | false 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /.run/release-build-bundle.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 18 | true 19 | true 20 | false 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /.run/signingreport.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 18 | true 19 | true 20 | false 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /.run/z-build-apk-bundle.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 19 | 21 | true 22 | true 23 | false 24 | false 25 | 26 | 27 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at faisalamircs@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2022 Muhammad Faisal Amir 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ## Automated Build Android Using Github Action 8 | [![Android CI](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci.yml/badge.svg)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci.yml) 9 | [![Download Generated APK AAB](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci-generate-apk-aab-download.yml/badge.svg)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci-generate-apk-aab-download.yml) 10 | [![Upload Generated APK AAB](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci-generate-apk-aab-upload.yml/badge.svg)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci-generate-apk-aab-upload.yml) 11 | [![Scan with Detekt](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/detekt-analysis.yml/badge.svg)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/detekt-analysis.yml) 12 | [![pages-build-deployment](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/pages/pages-build-deployment) 13 | [![Generated APK AAB (Clean)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci-generate-apk-aab-clean.yml/badge.svg)](https://github.com/amirisback/automated-build-android-app-with-github-action/actions/workflows/android-ci-generate-apk-aab-clean.yml) 14 | - Available on Google Dev Library [Click Here](https://devlibrary.withgoogle.com/products/android/repos/amirisback-automated-build-android-app-with-github-action) 15 | - Project Github Action Script YAML 16 | - Using Github Workflows 17 | - Automated Build AAB (release) 18 | - Automated Build APK (release and debug) 19 | - Have Bundle Tool 20 | - Download Artifact 21 | - Upload Artifact 22 | - Clear (Articfact naming) 23 | - Sample Naming : ${date_today} - ${repository_name} - ${playstore_name} - APK(s) release generated 24 | - Private Repository Tested (Passed Build App bundle(s) and APK generated successfully) 25 | - Local Run With .run configuration in Local Machine 26 | - Full Code For Github Action Workflows [Click Here](https://github.com/amirisback/automated-build-android-app-with-github-action/blob/master/.github/workflows/generate-apk-aab-debug-release.yml) 27 | 28 | ## Version Release 29 | This Is Latest Release 30 | 31 | $version_release = 2.2.5 32 | 33 | What's New?? 34 | 35 | * Update Target SDK 35 * 36 | * Update Action Script * 37 | * Update Android Studio Latest Version * 38 | * Update Gradle Latest Version * 39 | * Update Kotlin Latest Version * 40 | * Update Java Version From 11 to 17 * 41 | * Update Java Action version to 3 * 42 | * Update Android SDK Tools * 43 | * Add Bundletool.jar for workflow github action * 44 | * Add .run configuration * 45 | * Update To Libs.Version.Toml 46 | 47 | ## Article Sources 48 | - [How To Securely Build and Sign Your Android App With GitHub Actions](https://proandroiddev.com/how-to-securely-build-and-sign-your-android-app-with-github-actions-ad5323452ce) 49 | - [How to Use GitHub Actions to Automate Android App Development](https://www.freecodecamp.org/news/use-github-actions-to-automate-android-development/) 50 | - [Update Java Checkout Version CI](https://github.com/actions/setup-java) 51 | 52 | ## Guide Sources (Github Action) 53 | - [Download Artifact From Github Action](https://github.com/actions/download-artifact) 54 | - [Upload Artifact From Github Action](https://github.com/actions/upload-artifact) 55 | - [Remove Artifact](https://github.com/c-hive/gha-remove-artifacts) 56 | 57 | # Run Using Github Action 58 | 59 | ## How To Use Workflows 60 | 61 | ### Step 1. Upload Your Project on Github 62 | - Project must be android studio project using gradle 63 | 64 | ### Step 2. Create files github workflows 65 | - Create Files with name generate-apk-aab-debug-release.yml inside folder .github/workflows/ 66 | - .github/workflows/generate-apk-aab-debug-release.yml this is position files 67 | 68 | ### Step 3. Create Code 69 | ```yml 70 | name: Generated APK AAB (Upload - Create Artifact To Github Action) 71 | 72 | env: 73 | # The name of the main module repository 74 | main_project_module: app 75 | 76 | # The name of the Play Store 77 | playstore_name: Frogobox ID 78 | 79 | on: 80 | 81 | push: 82 | branches: 83 | - 'release/**' 84 | 85 | # Allows you to run this workflow manually from the Actions tab 86 | workflow_dispatch: 87 | 88 | jobs: 89 | build: 90 | 91 | runs-on: ubuntu-latest 92 | 93 | steps: 94 | - uses: actions/checkout@v4 95 | 96 | # Set Current Date As Env Variable 97 | - name: Set current date as env variable 98 | run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV 99 | 100 | # Set Repository Name As Env Variable 101 | - name: Set repository name as env variable 102 | run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV 103 | 104 | - name: Set Up JDK 105 | uses: actions/setup-java@v4 106 | with: 107 | distribution: 'zulu' # See 'Supported distributions' for available options 108 | java-version: '17' 109 | cache: 'gradle' 110 | 111 | - name: Change wrapper permissions 112 | run: chmod +x ./gradlew 113 | 114 | # Run Tests Build 115 | - name: Run gradle tests 116 | run: ./gradlew test 117 | 118 | # Run Build Project 119 | - name: Build gradle project 120 | run: ./gradlew build 121 | 122 | # Create APK Debug 123 | - name: Build apk debug project (APK) - ${{ env.main_project_module }} module 124 | run: ./gradlew assembleDebug 125 | 126 | # Create APK Release 127 | - name: Build apk release project (APK) - ${{ env.main_project_module }} module 128 | run: ./gradlew assemble 129 | 130 | # Create Bundle AAB Release 131 | # Noted for main module build [main_project_module]:bundleRelease 132 | - name: Build app bundle release (AAB) - ${{ env.main_project_module }} module 133 | run: ./gradlew ${{ env.main_project_module }}:bundleRelease 134 | 135 | # Upload Artifact Build 136 | # Noted For Output [main_project_module]/build/outputs/apk/debug/ 137 | - name: Upload APK Debug - ${{ env.repository_name }} 138 | uses: actions/upload-artifact@v4 139 | with: 140 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated 141 | path: ${{ env.main_project_module }}/build/outputs/apk/debug/ 142 | 143 | # Noted For Output [main_project_module]/build/outputs/apk/release/ 144 | - name: Upload APK Release - ${{ env.repository_name }} 145 | uses: actions/upload-artifact@v4 146 | with: 147 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) release generated 148 | path: ${{ env.main_project_module }}/build/outputs/apk/release/ 149 | 150 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 151 | - name: Upload AAB (App Bundle) Release - ${{ env.repository_name }} 152 | uses: actions/upload-artifact@v4 153 | with: 154 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated 155 | path: ${{ env.main_project_module }}/build/outputs/bundle/release/ 156 | ``` 157 | 158 | ### Step 4. Automated Build on Actions tab on your github repository 159 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-01.png?raw=true) 160 | 161 | ### Step 5. Download Artifact 162 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-02.png?raw=true) 163 | 164 | ### Extras (Private Repository Succesfully Build *Proven*) 165 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-private-repo.png?raw=true) 166 | 167 | ## Result Generated from Github Action 168 | 169 | ### APK(s) debug generated 170 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-apk-debug.png?raw=true) 171 | 172 | ### APK(s) release generated 173 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-apk-release.png?raw=true) 174 | 175 | ### App bundle(s) release generated 176 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-bundle.png?raw=true) 177 | 178 | ### Clean Up Artifact 179 | ```yml 180 | name: Generated APK AAB (Clean) 181 | 182 | on: 183 | # Allows you to run this workflow manually from the Actions tab 184 | workflow_dispatch: 185 | 186 | schedule: 187 | # Every day at 1am 188 | - cron: '0 1 * * *' 189 | 190 | jobs: 191 | remove-old-artifacts: 192 | runs-on: ubuntu-latest 193 | timeout-minutes: 10 194 | 195 | steps: 196 | - name: Clean all artifacts 197 | uses: c-hive/gha-remove-artifacts@v4 198 | with: 199 | age: '60 seconds' # ' ', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js 200 | # Optional inputs 201 | # skip-tags: true 202 | # skip-recent: 5 203 | ``` 204 | 205 | ### Using Bundle Tool 206 | 207 | #### Step 1. Prepare Bundle Tool 208 | - Check Bundletool on (.github/lib/bundletool.jar) [Download Latest](https://github.com/google/bundletool/releases) 209 | 210 | #### Step 2. Code Action in file [android-ci-generate-apk-aab-upload-3.yml](https://github.com/amirisback/automated-build-android-app-with-github-action/blob/master/.github/workflows/android-ci-generate-apk-aab-upload-3.yml) 211 | 212 | ```yml 213 | name: Generated APK AAB 2 Bundle Tool (Upload - Create Artifact To Github Action) 214 | 215 | env: 216 | # The name of the main module repository 217 | main_project_module: app 218 | 219 | # The name of the Play Store 220 | playstore_name: Frogobox ID 221 | 222 | # Keystore Path 223 | ks_path: frogoboxdev.jks 224 | 225 | # Keystore Password 226 | ks_store_pass: cronoclez 227 | 228 | # Keystore Alias 229 | ks_alias: frogobox 230 | 231 | # Keystore Alias Password 232 | ks_alias_pass: xeonranger 233 | 234 | on: 235 | 236 | push: 237 | branches: 238 | - 'release/**' 239 | 240 | # Allows you to run this workflow manually from the Actions tab 241 | workflow_dispatch: 242 | 243 | jobs: 244 | build: 245 | 246 | runs-on: ubuntu-latest 247 | 248 | steps: 249 | - uses: actions/checkout@v4 250 | 251 | # Set Current Date As Env Variable 252 | - name: Set current date as env variable 253 | run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV 254 | 255 | # Set Repository Name As Env Variable 256 | - name: Set repository name as env variable 257 | run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV 258 | 259 | - name: Set Up JDK 260 | uses: actions/setup-java@v4 261 | with: 262 | distribution: 'zulu' # See 'Supported distributions' for available options 263 | java-version: '17' 264 | cache: 'gradle' 265 | 266 | - name: Change wrapper permissions 267 | run: chmod +x ./gradlew 268 | 269 | # Run Tests Build 270 | - name: Run gradle tests 271 | run: ./gradlew test 272 | 273 | # Run Build Project 274 | - name: Build gradle project 275 | run: ./gradlew build 276 | 277 | # Create APK Debug 278 | - name: Build apk debug project (APK) - ${{ env.main_project_module }} module 279 | run: ./gradlew assembleDebug 280 | 281 | # Create APK Release 282 | - name: Build apk release project (APK) - ${{ env.main_project_module }} module 283 | run: ./gradlew assemble 284 | 285 | # Create Bundle AAB Release 286 | # Noted for main module build [main_project_module]:bundleRelease 287 | - name: Build app bundle release (AAB) - ${{ env.main_project_module }} module 288 | run: ./gradlew ${{ env.main_project_module }}:bundleRelease 289 | 290 | # - name: Build APK(s) Debug from bundle using bundletool 291 | # run: java -jar ".github/lib/bundletool.jar" build-apks --bundle=${{ env.main_project_module }}/build/outputs/bundle/debug/${{ env.artifact_name }}-debug.aab --output=${{ env.main_project_module }}/build/outputs/bundle/debug/${{ env.artifact_name }}-debug.apks --mode=universal 292 | 293 | - name: Set Env Artifact name from generated aab 294 | run: | 295 | cd ${{ env.main_project_module }}/build/outputs/bundle/release/ 296 | files=(*) 297 | echo "generated_name_aab=${files[0]%.*}" >> $GITHUB_ENV 298 | 299 | # Build APK From Bundle Using Bundletool 300 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 301 | - name: Build APK(s) Release from bundle using bundletool (Path same with bundle output) 302 | run: java -jar ".github/lib/bundletool.jar" build-apks --bundle=${{ env.main_project_module }}/build/outputs/bundle/release/${{ env.generated_name_aab }}.aab --output=${{ env.main_project_module }}/build/outputs/bundle/release/${{ env.generated_name_aab }}.apks --mode=universal --ks="app/${{ env.ks_path }}" --ks-pass=pass:${{ env.ks_store_pass }} --ks-key-alias=${{ env.ks_alias }} --key-pass=pass:${{ env.ks_alias_pass }} 303 | 304 | # Duplicate APK(s) Release to zip file and extract 305 | - name: Duplicate APK(s) Release to zip file and extract 306 | run: | 307 | cd ${{ env.main_project_module }}/build/outputs/bundle/release/ 308 | unzip -p ${{ env.generated_name_aab }}.apks universal.apk > ${{ env.generated_name_aab }}.apk 309 | 310 | # Upload Artifact Build 311 | # Noted For Output [main_project_module]/build/outputs/apk/debug/ 312 | - name: Upload APK Debug - ${{ env.repository_name }} 313 | uses: actions/upload-artifact@v4 314 | with: 315 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated 316 | path: ${{ env.main_project_module }}/build/outputs/apk/debug/ 317 | 318 | # Noted For Output [main_project_module]/build/outputs/apk/release/ 319 | - name: Upload APK Release - ${{ env.repository_name }} 320 | uses: actions/upload-artifact@v4 321 | with: 322 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) release generated 323 | path: ${{ env.main_project_module }}/build/outputs/apk/release/ 324 | 325 | # Noted For Output [main_project_module]/build/outputs/bundle/release/ 326 | - name: Upload AAB (App Bundle) Release - ${{ env.repository_name }} 327 | uses: actions/upload-artifact@v4 328 | with: 329 | name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated 330 | path: ${{ env.main_project_module }}/build/outputs/bundle/release/ 331 | ``` 332 | 333 | ### Step 3. Running Action 334 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/bundletool/ss_bundle_1.png?raw=true) 335 | 336 | ### Step 4. Waiting Running Action 337 | #### Waiting for running action 338 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/bundletool/ss_bundle_2.png?raw=true) 339 | #### Check periodically, afraid there is an error 340 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/bundletool/ss_bundle_3.png?raw=true) 341 | 342 | 343 | ### Step 5. Download Artifact and Extract it 344 | #### Download Artifact (AAB Artifact) 345 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/bundletool/ss_bundle_4.png?raw=true) 346 | #### Extract it !!! Done 347 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/bundletool/ss_bundle_5.png?raw=true) 348 | 349 | # Run Using Gradle Configuration 350 | 351 | ## .run Configuration (Alternative if you don't have github action) 352 | - Run on your local machine 353 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-configuration-01.png?raw=true) 354 | 355 | ### Step 1: Create Folder .run on Root Project Directory 356 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-configuration-02.png?raw=true) 357 | 358 | ### Step 2: Create File [name-config].run.xml 359 | ```xml 360 | 361 | 362 | 363 | 364 | 371 | 377 | 379 | true 380 | true 381 | false 382 | false 383 | 384 | 385 | 386 | ``` 387 | - Note : if you confuse you can use this feature 388 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-configuration-03.png?raw=true) 389 | 390 | ### Step 3: Your Configuration Will Appears on this Menu 391 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-configuration-04.png?raw=true) 392 | 393 | ### Step 4: Result run multiple task 394 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/ss-configuration-05.png?raw=true) 395 | 396 | ### Sample Configuration (signingreport) 397 | ```xml 398 | 399 | 400 | 401 | 408 | 413 | 415 | true 416 | true 417 | false 418 | false 419 | 420 | 421 | 422 | ``` 423 | 424 | ## Colaborator 425 | Very open to anyone, I'll write your name under this, please contribute by sending an email to me 426 | 427 | - Mail To faisalamircs@gmail.com 428 | - Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name] 429 | - Example : Github_amirisback_kotlin_admob-helper-implementation 430 | 431 | Name Of Contribute 432 | - Muhammad Faisal Amir 433 | - Waiting List 434 | - Waiting List 435 | 436 | Waiting for your contribute 437 | 438 | ## Attention !!! 439 | - Please enjoy and don't forget fork and give a star 440 | - Don't Forget Follow My Github Account 441 | 442 | ![ScreenShot](https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/master/docs/image/mad_score.png?raw=true) -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | |---------|--------------------| 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'automated-build-android-app-with-github-action' 2 | description: 'Automated build android app bundle and apk with github action' 3 | author: 'Muhammad Faisal Amir' 4 | branding: 5 | icon: archive 6 | color: green 7 | inputs: 8 | myInput: 9 | description: 'Input to use' 10 | required: false 11 | default: 'world' 12 | runs: 13 | using: 'docker' 14 | image: 'Dockerfile' 15 | args: 16 | - ${{ inputs.myInput }} 17 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.application") 3 | id("org.jetbrains.kotlin.android") 4 | } 5 | 6 | android { 7 | compileSdk = ProjectSetting.PROJECT_COMPILE_SDK 8 | namespace = ProjectSetting.PROJECT_NAME_SPACE 9 | 10 | defaultConfig { 11 | 12 | applicationId = ProjectSetting.PROJECT_APP_ID 13 | minSdk = ProjectSetting.PROJECT_MIN_SDK 14 | targetSdk = ProjectSetting.PROJECT_TARGET_SDK 15 | versionCode = ProjectSetting.PROJECT_VERSION_CODE 16 | versionName = ProjectSetting.PROJECT_VERSION_NAME 17 | 18 | multiDexEnabled = true 19 | vectorDrawables.useSupportLibrary = true 20 | 21 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 22 | 23 | // Naming APK // AAB 24 | setProperty("archivesBaseName", "${ProjectSetting.NAME_APK}[${versionName}]") 25 | 26 | } 27 | 28 | signingConfigs { 29 | create("release") { 30 | // You need to specify either an absolute path or include the 31 | // keystore file in the same directory as the build.gradle file. 32 | // [PROJECT FOLDER NAME/app/[COPY YOUT KEY STORE] .jks in here 33 | storeFile = file(ProjectSetting.KEY_PATH) 34 | storePassword = ProjectSetting.KEY_STORE_PASSWORD 35 | keyAlias = ProjectSetting.KEY_ALIAS 36 | keyPassword = ProjectSetting.KEY_ALIAS_PASSWORD 37 | } 38 | } 39 | 40 | buildTypes { 41 | getByName("release") { 42 | isMinifyEnabled = false 43 | 44 | // Disable Debug Mode 45 | isDebuggable = false 46 | isJniDebuggable = false 47 | isPseudoLocalesEnabled = false 48 | 49 | proguardFiles( 50 | getDefaultProguardFile("proguard-android-optimize.txt"), 51 | "proguard-rules.pro" 52 | ) 53 | 54 | // Generated Signed APK / AAB 55 | signingConfig = signingConfigs.getByName("release") 56 | 57 | } 58 | } 59 | 60 | buildFeatures { 61 | viewBinding = true 62 | buildConfig = true 63 | } 64 | 65 | compileOptions { 66 | sourceCompatibility = JavaVersion.VERSION_17 67 | targetCompatibility = JavaVersion.VERSION_17 68 | } 69 | 70 | kotlinOptions { 71 | jvmTarget = "17" 72 | } 73 | 74 | } 75 | 76 | dependencies { 77 | 78 | implementation(libs.androidx.core.ktx) 79 | implementation(libs.androidx.appcompat) 80 | implementation(libs.androidx.constraintlayout) 81 | implementation(libs.androidx.work.runtime.ktx) 82 | implementation(libs.material) 83 | 84 | testImplementation(libs.junit) 85 | androidTestImplementation(libs.androidx.junit) 86 | androidTestImplementation(libs.androidx.espresso.core) 87 | } -------------------------------------------------------------------------------- /app/frogoboxdev.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/frogoboxdev.jks -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/frogobox/githubaction/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.githubaction 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.frogobox.githubaction", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/frogobox/githubaction/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.githubaction 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | 6 | class MainActivity : AppCompatActivity() { 7 | override fun onCreate(savedInstanceState: Bundle?) { 8 | super.onCreate(savedInstanceState) 9 | setContentView(R.layout.activity_main) 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GithubAction 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/test/java/com/frogobox/githubaction/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.frogobox.githubaction 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | alias(libs.plugins.android.application) apply false 4 | alias(libs.plugins.android.library) apply false 5 | alias(libs.plugins.kotlin.android) apply false 6 | } 7 | 8 | tasks.register("clean", Delete::class) { 9 | delete(rootProject.layout.buildDirectory) 10 | } -------------------------------------------------------------------------------- /buildSrc/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | .gradle -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.gradle.kotlin.dsl.`kotlin-dsl` 2 | 3 | plugins { 4 | `kotlin-dsl` 5 | } 6 | 7 | repositories { 8 | mavenCentral() 9 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/Dependency.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by faisalamir on 19/09/21 3 | * FrogoRecyclerView 4 | * ----------------------------------------- 5 | * Name : Muhammad Faisal Amir 6 | * E-mail : faisalamircs@gmail.com 7 | * Github : github.com/amirisback 8 | * ----------------------------------------- 9 | * Copyright (C) 2021 FrogoBox Inc. 10 | * All rights reserved 11 | * 12 | */ 13 | 14 | object Dependency { 15 | 16 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/ProjectSetting.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by faisalamir on 19/09/21 3 | * FrogoRecyclerView 4 | * ----------------------------------------- 5 | * Name : Muhammad Faisal Amir 6 | * E-mail : faisalamircs@gmail.com 7 | * Github : github.com/amirisback 8 | * ----------------------------------------- 9 | * Copyright (C) 2021 FrogoBox Inc. 10 | * All rights reserved 11 | * 12 | */ 13 | 14 | object ProjectSetting { 15 | 16 | // --------------------------------------------------------------------------------------------- 17 | 18 | // Declaration app name 19 | const val NAME_APP = "Github Action Automated" 20 | 21 | const val APP_DOMAIN = "com" 22 | const val APP_PLAY_CONSOLE = "frogobox" 23 | const val APP_NAME = "githubaction" 24 | 25 | const val VERSION_MAJOR = 2 26 | const val VERSION_MINOR = 2 27 | const val VERSION_PATCH = 5 28 | 29 | const val PROJECT_MIN_SDK = 24 30 | const val PROJECT_COMPILE_SDK = 35 31 | 32 | // Setup Publish Setting 33 | const val KEY_PATH = "frogoboxdev.jks" 34 | const val KEY_STORE_PASSWORD = "cronoclez" 35 | const val KEY_ALIAS = "frogobox" 36 | const val KEY_ALIAS_PASSWORD = "xeonranger" 37 | 38 | // --------------------------------------------------------------------------------------------- 39 | 40 | // Constant Setup (Do not change this) 41 | 42 | const val PROJECT_TARGET_SDK = PROJECT_COMPILE_SDK 43 | 44 | const val PROJECT_APP_ID = "$APP_DOMAIN.$APP_PLAY_CONSOLE.$APP_NAME" 45 | const val PROJECT_NAME_SPACE = "com.frogobox.githubaction" 46 | const val PROJECT_VERSION_CODE = (VERSION_MAJOR * 100) + (VERSION_MINOR * 10) + (VERSION_PATCH * 1) 47 | const val PROJECT_VERSION_NAME = "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" 48 | 49 | // Declaration apk / aab name 50 | val NAME_APK = NAME_APP.lowercase().replace(" ", "-") 51 | val NAME_DB = NAME_APP.lowercase().replace(" ", "_") 52 | val DB = "\"$NAME_DB.db\"" 53 | 54 | } -------------------------------------------------------------------------------- /docs/image/bundletool/ss_bundle_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/bundletool/ss_bundle_1.png -------------------------------------------------------------------------------- /docs/image/bundletool/ss_bundle_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/bundletool/ss_bundle_2.png -------------------------------------------------------------------------------- /docs/image/bundletool/ss_bundle_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/bundletool/ss_bundle_3.png -------------------------------------------------------------------------------- /docs/image/bundletool/ss_bundle_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/bundletool/ss_bundle_4.png -------------------------------------------------------------------------------- /docs/image/bundletool/ss_bundle_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/bundletool/ss_bundle_5.png -------------------------------------------------------------------------------- /docs/image/mad_score.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/mad_score.png -------------------------------------------------------------------------------- /docs/image/ss-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-01.png -------------------------------------------------------------------------------- /docs/image/ss-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-02.png -------------------------------------------------------------------------------- /docs/image/ss-apk-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-apk-debug.png -------------------------------------------------------------------------------- /docs/image/ss-apk-release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-apk-release.png -------------------------------------------------------------------------------- /docs/image/ss-bundle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-bundle.png -------------------------------------------------------------------------------- /docs/image/ss-configuration-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-configuration-01.png -------------------------------------------------------------------------------- /docs/image/ss-configuration-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-configuration-02.png -------------------------------------------------------------------------------- /docs/image/ss-configuration-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-configuration-03.png -------------------------------------------------------------------------------- /docs/image/ss-configuration-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-configuration-04.png -------------------------------------------------------------------------------- /docs/image/ss-configuration-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-configuration-05.png -------------------------------------------------------------------------------- /docs/image/ss-private-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/docs/image/ss-private-repo.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true 24 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | agp = "8.7.2" 3 | kotlin = "1.9.24" 4 | coreKtx = "1.15.0" 5 | junit = "4.13.2" 6 | junitVersion = "1.2.1" 7 | espressoCore = "3.6.1" 8 | appcompat = "1.7.0" 9 | material = "1.12.0" 10 | activity = "1.9.3" 11 | constraintlayout = "2.2.0" 12 | workRuntimeKtx = "2.10.0" 13 | 14 | [libraries] 15 | androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 16 | androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" } 17 | junit = { group = "junit", name = "junit", version.ref = "junit" } 18 | androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } 19 | androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } 20 | androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } 21 | material = { group = "com.google.android.material", name = "material", version.ref = "material" } 22 | androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" } 23 | androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 24 | 25 | [plugins] 26 | android-application = { id = "com.android.application", version.ref = "agp" } 27 | android-library = { id = "com.android.library", version.ref = "agp" } 28 | kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } 29 | 30 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirisback/automated-build-android-app-with-github-action/badd22d36cda6f3866c879298754f11cef8f2cc9/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 11 12:32:43 WIB 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk17 3 | before_install: 4 | - sdk install java 17.0.1-open 5 | - sdk use java 17.0.1-open 6 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | maven { url = uri("https://jitpack.io") } 7 | } 8 | } 9 | 10 | dependencyResolutionManagement { 11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 12 | repositories { 13 | google() 14 | mavenCentral() 15 | maven { url = uri("https://jitpack.io") } 16 | } 17 | } 18 | 19 | rootProject.name = "GithubAction" 20 | include(":app") 21 | --------------------------------------------------------------------------------