diff --git a/.github/workflows/dev-workflow.yml b/.github/workflows/dev-workflow.yml new file mode 100644 index 0000000..6c99885 --- /dev/null +++ b/.github/workflows/dev-workflow.yml @@ -0,0 +1,47 @@ +name: Development workflow CI + +on: + push: + branches: + - git-workflow + - master + +jobs: + build_app: + runs-on: macos-latest + + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup JDK 19 + uses: actions/setup-java@v4 + with: + java-version: '19' + distribution: 'corretto' + cache: 'gradle' + # cache-dependency-path: | # optional + # sub-project/*.gradle* + # sub-project/**/gradle-wrapper.properties + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew buildDebug --console=plain + env: + CLIENT_ID: ${{ secrets.CLIENT_ID }} + +# - name: Run Coverage +# run: +# ./gradlew clean testDebugUnitTestCoverage +# +# - name: Add coverage to PR only +# if: github.event_name == 'pull_request' +# id: jacoco +# uses: madrapps/jacoco-report@v1.3 +# with: +# paths: ${{ github.workspace }}/build/reports/jacoco/testDebugUnitTestCoverage.xml +# token: ${{ secrets.GITHUB_TOKEN }} +# min-coverage-overall: 80 +# min-coverage-changed-files: 80 diff --git a/.github/workflows/prod-build-workflow.yml b/.github/workflows/prod-build-workflow.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/share-workflow.yml b/.github/workflows/share-workflow.yml new file mode 100644 index 0000000..e69de29 diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 02bb405..92718dc 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -16,8 +16,9 @@ android { consumerProguardFiles("consumer-rules.pro") val clientID: String by project + val apiKey = System.getenv("CLIENT_ID") ?: clientID + buildConfigField("String", "CLIENT_ID", "\"${apiKey}\"" ) - buildConfigField("String", "CLIENT_ID", clientID) } buildTypes { diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..998a164 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,19 @@ +## For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +#Tue Oct 17 22:33:45 BDT 2023 +android.defaults.buildfeatures.buildconfig=true +android.enableJetifier=false +android.nonFinalResIds=false +android.useAndroidX=true +clientID="210rEZdu_UXkCL-ntrKQ9Ya0xsluAbLZAZSR0Y8TkJs" +org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"