Skip to content

Commit

Permalink
Merge pull request #2 from KieronQuinn/release/2.0.1
Browse files Browse the repository at this point in the history
2.0.1
  • Loading branch information
KieronQuinn authored Mar 21, 2022
2 parents bbc673e + 537ce6c commit aad0adb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id 'com.google.android.gms.oss-licenses-plugin'
}

def tagName = '2.0'
def tagName = '2.0.1'

android {
compileSdk 32
Expand All @@ -16,7 +16,7 @@ android {
applicationId "com.kieronquinn.app.pixellaunchermods"
minSdk 31
targetSdk 32
versionCode 200
versionCode 201
versionName tagName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
22 changes: 19 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.apache.tools.ant.taskdefs.condition.Os
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
Expand Down Expand Up @@ -31,11 +32,26 @@ task cleanOverlay(type: Delete, dependsOn: ordered(':overlay:clean')) {
delete 'overlay/module/system/product/overlay/PixelLauncherModsOverlay/PixelLauncherModsOverlay.apk'
}

task buildAndCopyOverlay(type: Copy, dependsOn: ordered(':overlay:packageReleaseUniversalApk')) {
/**
* Using `:overlay:assembleRelease` does not seem to work from the Studio-embedded Gradle.
* Instead, we spawn a separate gradle for this small task.
*/
task assembleGradleDaemon(type: Exec) {
String gradleWrapper = ""
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
gradleWrapper = ".\\gradlew.bat"
}else{
gradleWrapper = "./gradlew"
}
workingDir "$projectDir"
commandLine gradleWrapper, ':overlay:assembleRelease'
}

task buildAndCopyOverlay(type: Copy, dependsOn: ordered(':assembleGradleDaemon')) {
//Copy built APK into module folder
from "overlay/build/outputs/universal_apk/release/overlay-release-universal.apk"
from "overlay/build/outputs/apk/release/overlay-release.apk"
into "overlay/module/system/product/overlay/PixelLauncherModsOverlay"
rename("overlay-release-universal.apk", "PixelLauncherModsOverlay.apk")
rename("overlay-release.apk", "PixelLauncherModsOverlay.apk")
}

task zipModule(type: Zip) {
Expand Down
1 change: 0 additions & 1 deletion overlay/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ android {
keyPassword "android"

v1SigningEnabled true
v2SigningEnabled true
}
}

Expand Down

0 comments on commit aad0adb

Please sign in to comment.