diff --git a/.github/workflows/fdroid-repository.yml b/.github/workflows/fdroid-repository.yml index 2e822ad42..006f893d7 100644 --- a/.github/workflows/fdroid-repository.yml +++ b/.github/workflows/fdroid-repository.yml @@ -22,6 +22,8 @@ concurrency: jobs: publish: + # The F-Droid repository metadata and Pages URL belong to the upstream project. + if: github.repository == 'yuga-hashimoto/and-code' runs-on: ubuntu-latest environment: name: github-pages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bda9be19..6f7f8db09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,8 +78,7 @@ jobs: GITHUB_CLIENT_ID: ${{ vars.AND_CODE_GITHUB_CLIENT_ID }} run: | if [ -z "$GITHUB_CLIENT_ID" ]; then - echo "AND_CODE_GITHUB_CLIENT_ID repo variable is not set - the published APK would have no GitHub sign-in" >&2 - exit 1 + echo "::warning::AND_CODE_GITHUB_CLIENT_ID repo variable is not set - the published APK will have no GitHub sign-in" fi ./gradlew detekt spotlessCheck :app:lintGithubDebug :app:testGithubDebugUnitTest assembleGithubDebug assembleGithubRelease # Separate invocation, deliberately without GITHUB_CLIENT_ID: this is the same flavor and diff --git a/.release-version b/.release-version index 37a16fb03..5f67c69ea 100644 --- a/.release-version +++ b/.release-version @@ -1 +1 @@ -v1.2.27 +v1.2.27-dp1 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 2921183bc..714ac06fa 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -12,17 +12,9 @@ plugins { id("com.google.firebase.crashlytics") apply false } -// The fdroid flavor's dependencies already exclude Firebase (see the "githubImplementation" -// entries below), but the google-services/crashlytics Gradle plugins process google-services.json -// project-wide regardless of flavor, so they must be skipped outright rather than merely left off -// a flavor's classpath. F-Droid's own build server builds with -Pandcode.fdroidBuild=true (see the -// `gradleprops` field this project's future fdroiddata metadata will declare) to produce a build -// with no Firebase/Google Play services code at all. -val isFdroidBuild = providers.gradleProperty("andcode.fdroidBuild").orNull.toBoolean() -if (!isFdroidBuild) { - apply(plugin = "com.google.gms.google-services") - apply(plugin = "com.google.firebase.crashlytics") -} +// Fork build (com.doublepi123.andcode): the google-services/crashlytics plugins are never applied +// and no Firebase dependency is declared, so no flavor sends anything to Firebase. The github +// flavor compiles the fdroid no-op diagnostics reporters (see sourceSets below). // When set, the native runtime payload (proot, libtalloc, libandroid-shmem) is built from // source by scripts/build_android_runtime_native_debs.sh before Gradle runs, and this build @@ -130,11 +122,11 @@ android { } defaultConfig { - applicationId = "com.yugahashimoto.andcode" + applicationId = "com.doublepi123.andcode" minSdk = 26 targetSdk = 35 versionCode = 66 - versionName = "1.2.27" + versionName = "1.2.27-dp1" buildConfigField("String", "GITHUB_CLIENT_ID", "\"$githubClientId\"") // The on-device runtime (see ANDROID_ABIS in scripts/prepare_android_runtime_native_libs.py) @@ -153,13 +145,12 @@ android { flavorDimensions += "distribution" productFlavors { // Distributed via GitHub Releases (and the self-hosted F-Droid repo built from those - // release APKs). Includes Firebase Analytics/Crashlytics. + // release APKs). In this fork it ships without Firebase, like the fdroid flavor. create("github") { dimension = "distribution" } // Built from source by F-Droid's own build server for the official F-Droid catalog. - // Firebase is excluded entirely; see the isFdroidBuild guard above and the - // "githubImplementation" dependencies below. + // Firebase is excluded entirely. create("fdroid") { dimension = "distribution" } @@ -233,6 +224,8 @@ android { } sourceSets { getByName("main").jniLibs.srcDir(generatedRuntimeJni) + // Fork: no Firebase, so the github flavor uses the fdroid no-op diagnostics reporters. + getByName("github").java.setSrcDirs(listOf("src/fdroid/java")) } packaging { resources { @@ -255,14 +248,6 @@ dependencies { // Core Android implementation("androidx.core:core-ktx:1.15.0") - // Firebase (github flavor only - the fdroid flavor ships with no Firebase/Google Play - // services code so it can be built from source by F-Droid's own build server). - // 34.17.0 pulls Play Services Measurement compiled with Kotlin 2.2 metadata, while this - // project is currently on Kotlin 2.0/KSP 2.0. Keep the Firebase stack on the compatible - // 33.6 line until the Android build toolchain is upgraded together. - "githubImplementation"(platform("com.google.firebase:firebase-bom:33.6.0")) - "githubImplementation"("com.google.firebase:firebase-analytics") - "githubImplementation"("com.google.firebase:firebase-crashlytics") implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7") implementation("androidx.lifecycle:lifecycle-process:2.8.7") diff --git a/benchmark/src/main/AndroidManifest.xml b/benchmark/src/main/AndroidManifest.xml index e35ea96b7..400a97889 100644 --- a/benchmark/src/main/AndroidManifest.xml +++ b/benchmark/src/main/AndroidManifest.xml @@ -2,10 +2,10 @@ - + + android:targetPackage="com.doublepi123.andcode" /> diff --git a/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/BaselineProfileGenerator.kt b/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/BaselineProfileGenerator.kt index 7cb9745bb..776e393f3 100644 --- a/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/BaselineProfileGenerator.kt +++ b/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/BaselineProfileGenerator.kt @@ -22,7 +22,7 @@ class BaselineProfileGenerator { rule.collect( packageName = InstrumentationRegistry.getArguments().getString("targetAppId") - ?: "com.yugahashimoto.andcode", + ?: "com.doublepi123.andcode", includeInStartupProfile = true, ) { pressHome() diff --git a/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/StartupProfileGenerator.kt b/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/StartupProfileGenerator.kt index 26c9195e6..a5d7ce9ee 100644 --- a/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/StartupProfileGenerator.kt +++ b/benchmark/src/main/java/com/yugahashimoto/andcode/benchmark/StartupProfileGenerator.kt @@ -22,7 +22,7 @@ class StartupProfileGenerator { @Test fun startupAndChatNavigation() { rule.measureRepeated( - packageName = "com.yugahashimoto.andcode", + packageName = "com.doublepi123.andcode", metrics = listOf(StartupTimingMetric()), iterations = 5, startupMode = StartupMode.COLD,