From 132517549e06d9e97daa571c9953034e34657da5 Mon Sep 17 00:00:00 2001 From: Inhishonor Date: Mon, 9 Jun 2025 12:14:58 -0700 Subject: [PATCH 1/2] Build debug build automatically with a debug key. No need to comment out that signing code!! --- presentation/build.gradle | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/presentation/build.gradle b/presentation/build.gradle index c5f87ee6..454ef398 100644 --- a/presentation/build.gradle +++ b/presentation/build.gradle @@ -40,6 +40,7 @@ android { } signingConfigs { + debug // Uses the default debug keystore. release { def keystoreProps = new Properties() def keystorePropsFile = rootProject.file('./.gradle/.gradlerc') @@ -47,16 +48,13 @@ android { keyAlias 'quik_release' if (keystorePropsFile.exists()) { keystoreProps.load(new FileInputStream(keystorePropsFile)) - } else if (System.getenv("CI") == "true") { -// do nothing - } else { - throw new GradleException("Keystore properties file not found.") - } + } else + // do nothing storePassword keystoreProps['storePassword'] keyPassword keystoreProps['keyPassword'] } } - + dependenciesInfo { // Disables dependency metadata when building APKs. includeInApk = false @@ -75,6 +73,7 @@ android { applicationIdSuffix ".debug" versionNameSuffix "-debug" resValue("string", "app_name", "QUIK-Debug") + signingConfig signingConfigs.debug } } @@ -87,13 +86,12 @@ android { jvmTarget = "1.8" } - productFlavors { withAnalytics { dimension "analytics" } noAnalytics { - signingConfig signingConfigs.release } } + lint { abortOnError false } @@ -233,3 +231,13 @@ if (getGradle().getStartParameter().getTaskRequests().toString().contains("WithA apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' } + +// Check to make sure that the keystore file is present when building a release +gradle.taskGraph.whenReady { taskGraph -> + if ((taskGraph.hasTask(':assembleRelease') || + taskGraph.allTasks.any { it.name == 'assembleRelease' }) && + !file('./.gradle/.gradlerc').exists() && + System.getenv("CI") != "true") { + throw new GradleException("Keystore properties file not found") + } +} \ No newline at end of file From 90c790cc23f08716ba39306b33bbd63dc8cf95ad Mon Sep 17 00:00:00 2001 From: Inhishonor Date: Mon, 9 Jun 2025 16:01:30 -0700 Subject: [PATCH 2/2] Remove section about modifying build files in contributing.md. --- CONTRIBUTING.md | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ce56229..d9cfc78e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,43 +41,5 @@ To update the wiki, simply navigate to the [wiki tab](https://github.com/octoshr 6. Submit a pull request with your change. **We have a build action on each pull request, if this build fails, please edit the pull request in order to make the build succeed.** ## Helpful Tips -### [build.gradle](https://github.com/octoshrimpy/quik/blob/master/presentation/build.gradle) configuration for building locally -``` - -/* - signingConfigs { - release { - def keystoreProps = new Properties() - def keystorePropsFile = rootProject.file('./.gradle/.gradlerc') - storeFile file('./my-release-key.keystore') - keyAlias 'quik_release' - if (keystorePropsFile.exists()) { - keystoreProps.load(new FileInputStream(keystorePropsFile)) - } else if (System.getenv("CI") == "true") { -// do nothing - } else { - throw new GradleException("Keystore properties file not found.") - } - storePassword keystoreProps['storePassword'] - keyPassword keystoreProps['keyPassword'] - } - } -*/ - buildTypes { - release { - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - // signingConfig signingConfigs.release - } - } - - productFlavors { - withAnalytics { dimension "analytics" } - noAnalytics { - // signingConfig signingConfigs.release - } - } -``` ### Set Java Version When building QUIK, make sure to download JDK 17 and specify an installation path for it. In Android Studio, you can do that in Settings > Build, Execution, Deployment > Build Tools > Gradle.