build: debug properties
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
||||
import org.gradle.configurationcache.extensions.capitalized
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
@@ -33,7 +34,7 @@ android {
|
||||
proguardFiles += file("proguard-rules.pro")
|
||||
}
|
||||
debug {
|
||||
(properties["debug_assemble_task"] == null).also {
|
||||
(properties["debug_flavor"] == null).also {
|
||||
isDebuggable = !it
|
||||
isMinifyEnabled = it
|
||||
isShrinkResources = it
|
||||
@@ -150,16 +151,14 @@ dependencies {
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
properties["debug_assemble_task"]?.let { tasks.findByName(it.toString()) }?.doLast {
|
||||
properties["debug_flavor"]?.toString()?.let { tasks.findByName("install${it.capitalized()}Debug") }?.doLast {
|
||||
runCatching {
|
||||
exec {
|
||||
commandLine("adb", "shell", "am", "force-stop", "com.snapchat.android")
|
||||
commandLine("adb", "shell", "am", "force-stop", properties["debug_package_name"])
|
||||
}
|
||||
Thread.sleep(1000L)
|
||||
exec {
|
||||
commandLine("adb", "install", "-r", "-d", apkDebugFile.absolutePath)
|
||||
}
|
||||
exec {
|
||||
commandLine("adb", "shell", "am", "start", "com.snapchat.android")
|
||||
commandLine("adb", "shell", "am", "start", properties["debug_package_name"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ var versionCode = 1 //"1" for now until stable release
|
||||
rootProject.ext.set("appVersionName", versionName)
|
||||
rootProject.ext.set("appVersionCode", versionCode)
|
||||
rootProject.ext.set("applicationId", "me.rhunk.snapenhance")
|
||||
rootProject.ext.set("buildHash", properties["custom_build_hash"] ?: java.security.SecureRandom().nextLong(1000000000, 99999999999).toString(16))
|
||||
rootProject.ext.set("buildHash", properties["debug_build_hash"] ?: java.security.SecureRandom().nextLong(1000000000, 99999999999).toString(16))
|
||||
|
||||
tasks.register("getVersion") {
|
||||
doLast {
|
||||
|
||||
@@ -42,7 +42,7 @@ android {
|
||||
proguardFiles += file("proguard-rules.pro")
|
||||
}
|
||||
debug {
|
||||
(properties["debug_assemble_task"] == null).also {
|
||||
(properties["debug_flavor"] == null).also {
|
||||
isDebuggable = !it
|
||||
isMinifyEnabled = it
|
||||
isShrinkResources = it
|
||||
|
||||
@@ -29,7 +29,7 @@ android {
|
||||
}
|
||||
ndk {
|
||||
//noinspection ChromeOsAbiSupport
|
||||
abiFilters += properties["custom_abi_filters"]?.toString()?.split(",")
|
||||
abiFilters += properties["debug_abi_filters"]?.toString()?.split(",")
|
||||
?: listOf("arm64-v8a", "armeabi-v7a")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user