* Debug package suffix and ability to override Gradle variables - now debug builds will have '.debug' suffix by default. It allows to have multiple app builds (debug and release) on the same device. If you don't need this, create a file local.properties and add `application_id_suffix=` into it - now everyone can override some variables from top-level build.gradle file. For example, gradle_plugin_version, debuggable manifest attribute, and so on. Overriding Gradle plugin version is useful for those who uses Intellij IDEA with older Gradle plugin than in Android Studio * Prevent socket name conflict from different packages * Configurable app name for debug build. By default it's SimpleX Debug * Changed defaults in build.gradle
46 lines
2.1 KiB
Groovy
46 lines
2.1 KiB
Groovy
buildscript {
|
|
Properties localProperties = new Properties()
|
|
if (rootProject.file('local.properties').canRead()) {
|
|
localProperties.load(rootProject.file("local.properties").newDataInputStream())
|
|
}
|
|
|
|
ext {
|
|
compose_version = localProperties['compose_version'] ?: '1.2.0-beta02'
|
|
kotlin_version = localProperties['kotlin_version'] ?: '1.6.21'
|
|
gradle_plugin_version = localProperties['gradle_plugin_version'] ?: '7.2.0'
|
|
|
|
// Name that will be shown for debug build. By default it is from strings
|
|
app_name = localProperties['app_name'] ?: "@string/app_name"
|
|
// Whether the app is debuggable or not. Specify `false` if you want good performance in debug builds
|
|
enable_debuggable = localProperties['debuggable'] ?: true
|
|
// Ending part of package name.
|
|
// Provide, for example, `application_id_suffix=.debug` in local.properties
|
|
// to allow debug & release versions to coexist
|
|
application_id_suffix = localProperties['application_id_suffix'] ?: ''
|
|
|
|
// NOTE: If you need a different version of something, provide it in `local.properties`
|
|
// like so: compose_version=123, or gradle_plugin_version=1.2.3, etc
|
|
}
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "com.android.tools.build:gradle:$gradle_plugin_version"
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath "org.jetbrains.kotlin:kotlin-serialization:1.3.2"
|
|
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
// in the individual module build.gradle files
|
|
}
|
|
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
plugins {
|
|
id 'com.android.application' version "$gradle_plugin_version" apply false
|
|
id 'com.android.library' version "$gradle_plugin_version" apply false
|
|
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
|
|
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version"
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
} |