Build FOSS APK in `pull-request.yml` (#1829)
* Update `.gitignore` * Run FOSS apk build in `pull-request.yml` * Deps locks rebuild * Turn off dependency locks * Fix deps locking in build-convention * Update stripping commands * Collect store app build artifacts Before cleaning and building the FOSS one.
This commit is contained in:
parent
88847b9894
commit
dd3857a8cd
|
@ -0,0 +1,37 @@
|
|||
name: 'Strip Non-FOSS Components'
|
||||
description: "This process grep out all non-FOSS aligned code fragments"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Stripping
|
||||
shell: bash
|
||||
run: |
|
||||
rm app/src/debug/google-services.json
|
||||
rm app/src/release/google-services.json
|
||||
rm -rf build-conventions-secant/build/
|
||||
rm -rf build-conventions-secant/.gradle/
|
||||
rm -rf buildSrc/build/
|
||||
rm -rf buildSrc/.gradle/
|
||||
rm -rf ui-screenshot-test
|
||||
rm -rf .gradle
|
||||
rm -rf build-conventions-secant/src/main/kotlin/secant.emulator-wtf-conventions.gradle.kts
|
||||
sed -i '/\/\/ start wtf maven/,/\/\/ end wtf maven/d' settings.gradle.kts
|
||||
find . -type f -name "build.gradle.kts" -exec sed -i -e '/wtf.emulator.gradle/d' {} +
|
||||
find . -type f -name "build.gradle.kts" -exec sed -i -e '/secant.emulator-wtf-conventions/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/wtf.emulator/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/wtf.emulator/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/com.vdurmont/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/com.vdurmont/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/org.json:json/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/org.json:json/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/io.sweers.autotransient/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/com.ryanharter.auto.value/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/io.sweers.autotransient/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/com.ryanharter.auto.value/d' {} +
|
||||
sed -i -e '/include("ui-screenshot-test")/d' settings.gradle.kts
|
||||
sed -i -e '/com.google.gms/d' -e '/com.google.android.gms/d' -e '/com.google.firebase/d' -e '/crashlyticsVersion/d' build.gradle.kts
|
||||
sed -i -e '/libs.google.services/d' -e '/libs.firebase/d' build.gradle.kts
|
||||
sed -i -e '/com.google.gms/d' -e '/com.google.android.gms/d' -e '/com.google.firebase/d' buildscript-gradle.lockfile
|
||||
sed -i -e '/libs.google.services/d' -e '/libs.firebase/d' buildscript-gradle.lockfile
|
||||
sed -i -e '/com.google.gms.google-services/d' -e '/com.google.firebase.crashlytics/d' */build.gradle.kts
|
||||
./gradlew clean
|
|
@ -543,7 +543,7 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
keytool -genkey -v -keystore $SIGNING_KEY_PATH -keypass android -storepass android -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 100000 -dname "CN=, OU=, O=Test, L=, S=, C=" -noprompt
|
||||
- name: Build
|
||||
- name: Build Store APK
|
||||
timeout-minutes: 25
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PATH: ${{ format('{0}/release.jks', env.home) }}
|
||||
|
@ -554,6 +554,7 @@ jobs:
|
|||
ORG_GRADLE_PROJECT_ZCASH_FLEXA_KEY: ${{ secrets.FLEXA_PUBLISHABLE_KEY }}
|
||||
run: |
|
||||
./gradlew :app:assembleZcashmainnetStoreDebug :app:assembleZcashtestnetStoreDebug :app:bundleZcashmainnetStoreRelease :app:bundleZcashtestnetStoreRelease :app:packageZcashmainnetStoreReleaseUniversalApk
|
||||
|
||||
- name: Collect Artifacts
|
||||
timeout-minutes: 1
|
||||
env:
|
||||
|
@ -566,6 +567,24 @@ jobs:
|
|||
zip -r ${BINARIES_ZIP_PATH} . -i app/build/outputs/apk/\*/\*/\*.apk app/build/outputs/apk_from_bundle/\*/\*.apk app/build/outputs/bundle/\*/\*.aab
|
||||
zip -r ${MAPPINGS_ZIP_PATH} . -i *app/build/outputs/mapping/\*/\*/mapping.txt
|
||||
zip -r ${COMPOSE_METRICS_ZIP_PATH} . -i \*/build/compose-metrics/\* \*/build/compose-reports/\*
|
||||
|
||||
- name: Strip non-FOSS libraries
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/actions/foss/strip
|
||||
|
||||
- name: Build FOSS APK
|
||||
timeout-minutes: 25
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PATH: ${{ format('{0}/release.jks', env.home) }}
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PASSWORD: android
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEY_ALIAS: androiddebugkey
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEY_ALIAS_PASSWORD: android
|
||||
# TODO [#1789] Re-enable Coinbase and Flexa integrations for FOSS variant
|
||||
# ORG_GRADLE_PROJECT_ZCASH_COINBASE_APP_ID: ${{ secrets.COINBASE_APP_ID }}
|
||||
# ORG_GRADLE_PROJECT_ZCASH_FLEXA_KEY: ${{ secrets.FLEXA_PUBLISHABLE_KEY }}
|
||||
run: |
|
||||
./gradlew :app:assembleZcashmainnetFossRelease
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
timeout-minutes: 2
|
||||
|
|
|
@ -138,36 +138,11 @@ jobs:
|
|||
mkdir artifacts/
|
||||
mv app/build/outputs/apk_from_bundle/*/* artifacts/
|
||||
|
||||
- name: Strip non-Foss libraries
|
||||
- name: Strip non-FOSS libraries
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
rm app/src/debug/google-services.json
|
||||
rm app/src/release/google-services.json
|
||||
rm -rf build-conventions-secant/build/
|
||||
rm -rf build-conventions-secant/.gradle/
|
||||
rm -rf buildSrc/build/
|
||||
rm -rf buildSrc/.gradle/
|
||||
rm -rf ui-screenshot-test
|
||||
rm -rf .gradle
|
||||
rm -rf build-conventions-secant/src/main/kotlin/secant.emulator-wtf-conventions.gradle.kts
|
||||
sed -i '/\/\/ start wtf maven/,/\/\/ end wtf maven/d' settings.gradle.kts
|
||||
find . -type f -name "build.gradle.kts" -exec sed -i -e '/wtf.emulator.gradle/d' {} +
|
||||
find . -type f -name "build.gradle.kts" -exec sed -i -e '/secant.emulator-wtf-conventions/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/wtf.emulator/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/wtf.emulator/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/com.vdurmont/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/com.vdurmont/d' {} +
|
||||
find . -type f -name "gradle.lockfile" -exec sed -i -e '/org.json:json/d' {} +
|
||||
find . -type f -name "buildscript-gradle.lockfile" -exec sed -i -e '/org.json:json/d' {} +
|
||||
sed -i -e '/include("ui-screenshot-test")/d' settings.gradle.kts
|
||||
sed -i -e '/com.google.gms/d' -e '/com.google.android.gms/d' -e '/com.google.firebase/d' -e '/crashlyticsVersion/d' build.gradle.kts
|
||||
sed -i -e '/libs.google.services/d' -e '/libs.firebase/d' build.gradle.kts
|
||||
sed -i -e '/com.google.gms/d' -e '/com.google.android.gms/d' -e '/com.google.firebase/d' buildscript-gradle.lockfile
|
||||
sed -i -e '/libs.google.services/d' -e '/libs.firebase/d' buildscript-gradle.lockfile
|
||||
sed -i -e '/com.google.gms.google-services/d' -e '/com.google.firebase.crashlytics/d' */build.gradle.kts
|
||||
./gradlew clean
|
||||
uses: ./.github/actions/foss/strip
|
||||
|
||||
- name: Build Foss APK
|
||||
- name: Build FOSS APK
|
||||
timeout-minutes: 25
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PATH: ${{ format('{0}/release.jks', env.home) }}
|
||||
|
@ -180,7 +155,7 @@ jobs:
|
|||
run: |
|
||||
./gradlew :app:assembleZcashmainnetFossRelease
|
||||
|
||||
- name: Prepare Foss artifacts
|
||||
- name: Prepare FOSS artifacts
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
mv app/build/outputs/apk/zcashmainnetFoss/release/app-zcashmainnet-foss-release.apk artifacts/
|
||||
|
|
|
@ -9,6 +9,9 @@ gen/
|
|||
local.properties
|
||||
*.iml
|
||||
*.hprof
|
||||
*.apk
|
||||
*.aab
|
||||
*.keystore
|
||||
|
||||
# IDE-specific files
|
||||
.idea/AndroidProjectSystem.xml
|
||||
|
|
|
@ -4,24 +4,6 @@ plugins {
|
|||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
buildscript {
|
||||
dependencyLocking {
|
||||
// This property is treated specially, as it is not defined by default in the root gradle.properties
|
||||
// and declaring it in the root gradle.properties is ignored by included builds. This only picks up
|
||||
// a value declared as a system property, a command line argument, or a an environment variable.
|
||||
val isDependencyLockingEnabled = if (project.hasProperty("ZCASH_IS_DEPENDENCY_LOCKING_ENABLED")) {
|
||||
project.property("ZCASH_IS_DEPENDENCY_LOCKING_ENABLED").toString().toBoolean()
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
||||
if (isDependencyLockingEnabled) {
|
||||
lockAllConfigurations()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencyLocking {
|
||||
// This property is treated specially, as it is not defined by default in the root gradle.properties
|
||||
// and declaring it in the root gradle.properties is ignored by included builds. This only picks up
|
||||
|
|
|
@ -45,7 +45,6 @@ com.android.tools:sdk-common:31.9.0=classpath
|
|||
com.android.tools:sdklib:31.9.0=classpath
|
||||
com.android:signflinger:8.9.0=classpath
|
||||
com.android:zipflinger:8.9.0=classpath
|
||||
com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin:0.51.0=classpathCopy,classpathCopy2
|
||||
com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin:0.52.0=classpath
|
||||
com.github.ben-manes:gradle-versions-plugin:0.52.0=classpath
|
||||
com.google.android.gms:strict-version-matcher-plugin:1.2.4=classpath
|
||||
|
@ -79,8 +78,6 @@ com.google.protobuf:protobuf-java:3.24.4=classpath
|
|||
com.google.testing.platform:core-proto:0.0.9-alpha03=classpath
|
||||
com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath
|
||||
com.osacky.flank.gradle:fladle:0.17.5=classpath
|
||||
com.osacky.fulladle:com.osacky.fulladle.gradle.plugin:0.17.3=classpathCopy
|
||||
com.osacky.fulladle:com.osacky.fulladle.gradle.plugin:0.17.4=classpathCopy2
|
||||
com.osacky.fulladle:com.osacky.fulladle.gradle.plugin:0.17.5=classpath
|
||||
com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1=classpath
|
||||
com.squareup.moshi:moshi-kotlin:1.12.0=classpath
|
||||
|
@ -98,8 +95,6 @@ commons-codec:commons-codec:1.17.1=classpath
|
|||
commons-io:commons-io:2.17.0=classpath
|
||||
commons-logging:commons-logging:1.2=classpath
|
||||
io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.8=classpath
|
||||
io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.19.0=classpathCopy
|
||||
io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.20.0=classpathCopy2
|
||||
io.grpc:grpc-api:1.68.2=classpath
|
||||
io.grpc:grpc-context:1.68.2=classpath
|
||||
io.grpc:grpc-core:1.57.2=classpath
|
||||
|
|
Loading…
Reference in New Issue