Skip to content

Commit 14f1310

Browse files
resolve conflicts ?
1 parent 3e3e82a commit 14f1310

File tree

4 files changed

+740
-576
lines changed

4 files changed

+740
-576
lines changed

build.gradle

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,29 @@ allprojects {
114114
}
115115
}
116116

117-
final def buildTime = new Date().format("yyyyMMddHHmm")
118-
119117
final def buildCommit = providers.exec {
120118
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
121119
}.standardOutput.asText.get().trim()
122120

123-
final def versionString = "14.0.0"
124-
final def versionDisplayName = "${versionString} (${buildCommit})"
125-
final def parts = versionString.split("\\.")
126-
final def majorVersion = parts[0]
127-
final def versionInt = parts[0].toInteger() * 1000000 + parts[1].toInteger() * 10000 + parts[2].toInteger() * 100
121+
final def ciBuild = System.getenv("CI") == "true"
122+
final def ciRef = System.getenv("GITHUB_REF") ?: ""
123+
final def ciRunNumber = System.getenv("GITHUB_RUN_NUMBER") ?: ""
124+
final def isReleaseBuild = ciBuild && ciRef.contains("beta")
125+
final def devReleaseName = ciBuild ? "Dev.(#${ciRunNumber})" : "Dev.(${buildCommit})"
126+
final def version = "14"
127+
final def releaseName = "Beta 3"
128+
final def versionDisplayName = "${version}.${isReleaseBuild ? releaseName : devReleaseName}"
129+
final def majorVersion = versionDisplayName.split("\\.")[0]
128130

129131
final def quickstepMinSdk = "29"
130132
final def quickstepMaxSdk = "34"
131133

132134
android {
133135
namespace "com.android.launcher3"
134136
defaultConfig {
135-
versionCode versionInt
137+
// Lawnchair Launcher 14.0 Beta 3
138+
// See CONTRIBUTING.md#versioning-scheme
139+
versionCode 14_00_02_03
136140
versionName "${versionDisplayName}"
137141
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
138142
buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\""
@@ -147,7 +151,8 @@ android {
147151

148152
applicationVariants.configureEach { variant ->
149153
variant.outputs.configureEach {
150-
outputFileName = "Lawnchair-${versionString}-${buildTime}-${buildCommit}.apk"
154+
def channel = variant.productFlavors.last().name
155+
outputFileName = "Lawnchair.${variant.versionName}.$channel.${variant.buildType.name}.apk"
151156
}
152157
}
153158

@@ -201,12 +206,17 @@ android {
201206

202207
buildTypes {
203208
all {
204-
pseudoLocalesEnabled true
205-
resValue("string", "derived_app_name", "Lawnchair")
206209
signingConfig releaseSigning
210+
pseudoLocalesEnabled true
211+
}
212+
213+
debug {
214+
applicationIdSuffix ".debug"
215+
resValue("string", "derived_app_name", "Lawnchair (Debug)")
207216
}
208217

209218
release {
219+
resValue("string", "derived_app_name", "Lawnchair")
210220
minifyEnabled true
211221
shrinkResources true
212222
proguardFiles proguardFilesFromAosp + "proguard.pro"
@@ -223,19 +233,29 @@ android {
223233
}
224234

225235
// See: https://developer.android.com/studio/build/build-variants#flavor-dimensions
226-
flavorDimensions += ["app", "recents"]
236+
flavorDimensions += ["app", "recents", "channel"]
227237

228238
productFlavors {
229239
lawn {
230240
dimension "app"
231-
applicationId 'app.lawnchair'
232241
}
233242

234243
withQuickstep {
235244
dimension "recents"
236245
minSdk 26
237246
}
238247

248+
github {
249+
applicationId 'app.lawnchair'
250+
dimension "channel"
251+
}
252+
253+
play {
254+
applicationId "app.lawnchair.play"
255+
dimension "channel"
256+
isDefault true
257+
}
258+
239259
configureEach {
240260
resValue("string", "launcher_component", "${applicationId}/app.lawnchair.LawnchairLauncher")
241261
}
@@ -264,7 +284,11 @@ android {
264284
}
265285
}
266286

267-
lawnWithQuickstep {
287+
lawnWithQuickstepGithub {
288+
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
289+
}
290+
291+
lawnWithQuickstepPlay {
268292
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
269293
}
270294

@@ -338,7 +362,7 @@ dependencies {
338362
implementation "androidx.recyclerview:recyclerview:1.3.2"
339363
implementation "androidx.preference:preference-ktx:1.2.1"
340364

341-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
365+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0'
342366
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.2'
343367
implementation 'com.github.ChickenHook:RestrictionBypass:2.2'
344368
implementation 'dev.rikka.tools.refine:runtime:4.4.0'

0 commit comments

Comments
 (0)