diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e3e4a9cbf6..71e6de26d59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,12 +52,12 @@ jobs: echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks fi - name: Build debug APK - run: ./gradlew assembleLawnWithQuickstepDebug + run: ./gradlew assembleLawnWithQuickstepGithubDebug assembleLawnWithQuickstepMarketDebug - name: Upload artifact uses: actions/upload-artifact@v4 with: name: Debug APK - path: build/outputs/apk/lawnWithQuickstep/debug/*.apk + path: build/outputs/apk/**/*.apk check-style: runs-on: ubuntu-latest diff --git a/.github/workflows/release_update.yml b/.github/workflows/release_update.yml index e87cc70d692..34d755be941 100644 --- a/.github/workflows/release_update.yml +++ b/.github/workflows/release_update.yml @@ -35,7 +35,7 @@ jobs: with: gradle-home-cache-cleanup: true - name: Build release APK - run: ./gradlew assembleLawnWithQuickstepRelease + run: ./gradlew assembleLawnWithQuickstepMarketRelease - name: Write sign info if: github.repository_owner == 'LawnchairLauncher' run: | diff --git a/baseline-profile/build.gradle b/baseline-profile/build.gradle index d62b8b635c8..60a0dfa7592 100644 --- a/baseline-profile/build.gradle +++ b/baseline-profile/build.gradle @@ -15,10 +15,12 @@ android { targetProjectPath = ":" - flavorDimensions += ["app", "recents"] + flavorDimensions += ["app", "recents", "channel"] productFlavors { lawn { dimension = "app" } withQuickstep { dimension = "recents" } + github { dimension = "channel" } + market { dimension = "channel" } } testOptions.managedDevices.devices { diff --git a/build.gradle b/build.gradle index 691d0e376d3..1baf48b73cf 100644 --- a/build.gradle +++ b/build.gradle @@ -145,7 +145,7 @@ android { def copyArtifactsTask = tasks.register("copy${capName}Artifacts", Copy) { dependsOn(licenseeTask) from(licenseeTask.map { it.outputDir.file("artifacts.json") }) - into(layout.buildDirectory.dir("generated/dependencyAssets")) + into(layout.buildDirectory.dir("generated/dependencyAssets/${variant.name}")) } variant.sources.assets?.addGeneratedSourceDirectory(licenseeTask) { objects.directoryProperty().fileProvider(copyArtifactsTask.map { it.destinationDir }) @@ -155,7 +155,8 @@ android { applicationVariants.configureEach { variant -> variant.outputs.configureEach { - outputFileName = "Lawnchair ${variant.versionName}.apk" + def channel = variant.productFlavors.last().name + outputFileName = "Lawnchair ${variant.versionName} $channel ${variant.buildType.name}.apk" } } @@ -227,38 +228,28 @@ android { includeInBundle = false } - // The flavor dimensions for build variants (e.g. aospWithQuickstep, aospWithoutQuickstep) // See: https://developer.android.com/studio/build/build-variants#flavor-dimensions - flavorDimensions += ["app", "recents"] + flavorDimensions += ["app", "recents", "channel"] productFlavors { - aosp { - dimension "app" - applicationId 'com.android.launcher3' - testApplicationId 'com.android.launcher3.tests' - } - - l3go { - dimension "app" - applicationId 'com.android.launcher3' - testApplicationId 'com.android.launcher3.tests' - } - lawn { dimension "app" - applicationId 'app.lawnchair' - testApplicationId 'com.android.launcher3.tests' - isDefault true } withQuickstep { dimension "recents" minSdk 26 - isDefault true } - withoutQuickstep { - dimension "recents" + github { + applicationId 'app.lawnchair' + dimension "channel" + } + + market { + applicationId "ch.deletescape.lawnchair.plah" + dimension "channel" + isDefault true } configureEach { @@ -276,42 +267,6 @@ android { } } - androidTest { - res.srcDirs = ['tests/res'] - java.srcDirs = ['tests/src', 'tests/tapl'] - manifest.srcFile "tests/AndroidManifest-common.xml" - } - - androidTestDebug { - manifest.srcFile "tests/AndroidManifest.xml" - } - - aosp { - java.srcDirs = ['src_flags', 'src_shortcuts_overrides'] - } - - aospWithoutQuickstep { - manifest.srcFile "AndroidManifest.xml" - } - - aospWithQuickstep { - manifest.srcFile "quickstep/AndroidManifest-launcher.xml" - } - - l3go { - res.srcDirs = ['go/res'] - java.srcDirs = ['go/src'] - manifest.srcFile "go/AndroidManifest.xml" - } - - l3goWithoutQuickstepDebug { - manifest.srcFile "AndroidManifest.xml" - } - - l3goWithQuickstepDebug { - manifest.srcFile "quickstep/AndroidManifest-launcher.xml" - } - lawn { java.srcDirs = ['src_flags', 'src_shortcuts_overrides', 'lawnchair/src', 'tests/shared'] aidl.srcDirs = ['lawnchair/aidl'] @@ -325,17 +280,12 @@ android { } } - lawnWithoutQuickstep { - manifest.srcFile "AndroidManifest.xml" - } - - lawnWithQuickstep { + lawnWithQuickstepGithub { manifest.srcFile "quickstep/AndroidManifest-launcher.xml" - assets.srcDir layout.buildDirectory.dir("generated/dependencyAssets/") } - withoutQuickstep { - java.srcDirs = ['src_ui_overrides'] + lawnWithQuickstepMarket { + manifest.srcFile "quickstep/AndroidManifest-launcher.xml" } withQuickstep { @@ -369,9 +319,6 @@ dependencies { implementation fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell-14.jar') withQuickstepCompileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'framework-14.jar') - // Required for AOSP to compile. This is already included in the sysui_shared.jar - withoutQuickstepImplementation fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'plugin_core.jar') - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' implementation 'androidx.profileinstaller:profileinstaller:1.3.1' diff --git a/ci.py b/ci.py index a73e4d772b1..bdfd624eda4 100644 --- a/ci.py +++ b/ci.py @@ -36,8 +36,11 @@ def send_document_to_telegram_chat(chat_id, document): ) def send_artifact_to_telegram_chat(chat_id): - with open(f"{artifact_directory}/{os.listdir(artifact_directory)[0]}", "rb") as artifact: - send_document_to_telegram_chat(chat_id=chat_id, document=artifact) + subdirectories = os.listdir(artifact_directory) + for each_directory in subdirectories: + full_path = f"{artifact_directory}/{each_directory}/debug" + with open(f"{full_path}/{os.listdir(full_path)[0]}", "rb") as artifact: + send_document_to_telegram_chat(chat_id=chat_id, document=artifact) def send_internal_notifications(): repository = git.Repo(".")