|
| 1 | +import com.rickbusarow.kgx.libsCatalog |
| 2 | +import com.rickbusarow.kgx.version |
| 3 | +import com.squareup.workflow1.buildsrc.internal.javaTarget |
| 4 | +import com.squareup.workflow1.buildsrc.internal.javaTargetVersion |
| 5 | + |
1 | 6 | plugins { |
2 | | - id("com.android.application") |
| 7 | + id("com.android.library") |
3 | 8 | id("kotlin-android") |
4 | | - id("android-defaults") |
| 9 | + // id("android-defaults") |
| 10 | + alias(libs.plugins.androidx.benchmark) |
5 | 11 | alias(libs.plugins.compose.compiler) |
6 | 12 | } |
7 | 13 |
|
8 | 14 | // Note: We are not including our defaults from .buildscript as we do not need the base Workflow |
9 | 15 | // dependencies that those include. |
10 | 16 |
|
11 | 17 | android { |
| 18 | + compileSdk = libsCatalog.version("compileSdk").toInt() |
| 19 | + |
| 20 | + compileOptions { |
| 21 | + sourceCompatibility = javaTargetVersion |
| 22 | + targetCompatibility = javaTargetVersion |
| 23 | + } |
| 24 | + |
| 25 | + kotlinOptions { |
| 26 | + jvmTarget = javaTarget |
| 27 | + freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" |
| 28 | + } |
| 29 | + |
12 | 30 | defaultConfig { |
| 31 | + minSdk = 28 |
| 32 | + targetSdk = libsCatalog.version("targetSdk").toInt() |
| 33 | + |
13 | 34 | // TODO why isn't this taking? |
14 | 35 | testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner" |
| 36 | + |
| 37 | + // must be one of: 'None', 'StackSampling', or 'MethodTracing' |
| 38 | + testInstrumentationRunnerArguments["androidx.benchmark.profiling.mode"] = "MethodTracing" |
| 39 | + testInstrumentationRunnerArguments["androidx.benchmark.output.enable"] = "true" |
15 | 40 | } |
16 | 41 |
|
| 42 | + // buildTypes { |
| 43 | + // debug { |
| 44 | + // isDebuggable = false |
| 45 | + // isProfileable = true |
| 46 | + // } |
| 47 | + // } |
| 48 | + |
| 49 | + testBuildType = "release" |
| 50 | + // testBuildType = "debug" |
17 | 51 | buildTypes { |
18 | 52 | debug { |
19 | | - isDebuggable = false |
| 53 | + // Since isDebuggable can"t be modified by gradle for library modules, |
| 54 | + // it must be done in a manifest - see src/androidTest/AndroidManifest.xml |
| 55 | + isMinifyEnabled = true |
| 56 | + proguardFiles( |
| 57 | + getDefaultProguardFile("proguard-android-optimize.txt"), "benchmark-proguard-rules.pro" |
| 58 | + ) |
| 59 | + } |
| 60 | + release { |
| 61 | + isDefault = true |
20 | 62 | } |
21 | 63 | } |
22 | 64 |
|
|
0 commit comments