11import com.github.triplet.gradle.androidpublisher.ReleaseStatus
22import com.github.triplet.gradle.androidpublisher.ResolutionStrategy
3- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
43
54plugins {
6- id( " com. android.application" )
7- id( " org.jetbrains .kotlin.android" )
8- id( " org.jetbrains .kotlin.plugin. compose" )
9- id( " com.github.triplet. play" ) version " 3.13.0 "
5+ alias(libs.plugins. android.application)
6+ alias(libs.plugins .kotlin.android)
7+ alias(libs.plugins .kotlin.compose)
8+ alias(libs.plugins. play.publisher)
109}
1110
1211android {
1312 namespace = " com.hello.curiosity"
14- compileSdk = 35
1513
1614 defaultConfig {
1715 applicationId = " com.hello.curiosity.design"
18- minSdk = 23
1916 targetSdk = 35
2017
2118 versionCode = System .getenv(" GITHUB_RUN_NUMBER" )?.toInt() ? : 1
2219 versionName = System .getenv(" VERSION" ) ? : " local"
2320
24- testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
2521 vectorDrawables {
2622 useSupportLibrary = true
2723 }
@@ -47,7 +43,7 @@ android {
4743 signingConfig = signingConfigs.getByName(" release" )
4844 proguardFiles(
4945 getDefaultProguardFile(" proguard-android-optimize.txt" ),
50- " proguard-rules.pro"
46+ " proguard-rules.pro" ,
5147 )
5248 }
5349 }
@@ -63,94 +59,44 @@ android {
6359 artifactDir.set(file(" build/outputs/bundle/release" ))
6460 }
6561
66- compileOptions {
67- sourceCompatibility = JavaVersion .VERSION_17
68- targetCompatibility = JavaVersion .VERSION_17
69- }
70-
71- kotlin {
72- compilerOptions {
73- jvmTarget.set(JvmTarget .JVM_17 )
74- }
75- }
76-
77- buildFeatures {
78- compose = true
79- }
80-
8162 packaging {
8263 resources {
8364 excludes + = " /META-INF/{AL2.0,LGPL2.1}"
8465 }
8566 }
86-
87- testOptions {
88- unitTests {
89- isIncludeAndroidResources = true
90- isReturnDefaultValues = true
91- }
92- }
9367}
9468
9569dependencies {
96- // Android
97- implementation(" androidx.core:core-ktx:1.16.0" )
98-
99- // Compose
100- implementation(" androidx.activity:activity-compose:1.10.1" )
101- implementation(" androidx.compose.material:material:1.11.0" )
102- implementation(" androidx.compose.material:material-icons-extended:1.7.8" )
103- implementation(" androidx.navigation:navigation-compose:2.9.8" )
104- debugImplementation(" androidx.compose.ui:ui-tooling:1.11.0" )
105- implementation(" androidx.compose.ui:ui-tooling-preview:1.11.0" )
106- implementation(" androidx.compose.ui:ui:1.11.0" )
107-
108- // Curiosity
70+ implementation(libs.androidx.core.ktx)
71+
72+ implementation(libs.androidx.activity.compose)
73+ implementation(libs.androidx.compose.material)
74+ implementation(libs.androidx.compose.material.icons.extended)
75+ implementation(libs.androidx.navigation.compose)
76+ implementation(libs.androidx.compose.ui)
77+ implementation(libs.androidx.compose.ui.tooling.preview)
78+ debugImplementation(libs.androidx.compose.ui.tooling)
79+
10980 implementation(project(" :curiosity" ))
11081 implementation(project(" :navigation" ))
11182 implementation(project(" :settings" ))
11283
113- // Leak
114- debugImplementation(" com.squareup.leakcanary:leakcanary-android:2.14" )
84+ debugImplementation(libs.leakcanary.android)
11585
116- // Testing
117- testImplementation(" junit:junit:4.13.2" )
118-
119- // Curiosity testing utils
86+ testImplementation(libs.junit)
12087 testImplementation(project(" :test-compose-utils" ))
88+ testImplementation(libs.androidx.compose.ui.test.junit4)
89+ testImplementation(libs.androidx.navigation.testing)
90+ debugImplementation(libs.androidx.compose.ui.test.manifest)
12191
122- // Compose
123- debugImplementation(" androidx.compose.ui:ui-test-manifest:1.11.0" )
124- testImplementation(" androidx.compose.ui:ui-test-junit4:1.11.0" )
125- testImplementation(" androidx.navigation:navigation-testing:2.9.8" )
126-
127- // Robolectric
128- testImplementation(" org.robolectric:robolectric:4.16.1" ) {
129- exclude(module = " classworlds" )
130- exclude(module = " commons-logging" )
131- exclude(module = " httpclient" )
132- exclude(module = " maven-artifact" )
133- exclude(module = " maven-artifact-manager" )
134- exclude(module = " maven-error-diagnostics" )
135- exclude(module = " maven-model" )
136- exclude(module = " maven-project" )
137- exclude(module = " maven-settings" )
138- exclude(module = " plexus-container-default" )
139- exclude(module = " plexus-interpolation" )
140- exclude(module = " plexus-utils" )
141- exclude(module = " wagon-file" )
142- exclude(module = " wagon-http-lightweight" )
143- exclude(module = " wagon-provider-api" )
144- exclude(module = " auto-service" )
145- }
146-
147- // Android Testing
148- androidTestImplementation(" androidx.test.espresso:espresso-core:3.7.0" )
149- androidTestImplementation(" androidx.test.ext:junit:1.3.0" )
150- androidTestImplementation(" androidx.compose.ui:ui-test-junit4:1.11.0" )
92+ androidTestImplementation(libs.androidx.test.espresso.core)
93+ androidTestImplementation(libs.androidx.test.ext.junit)
94+ androidTestImplementation(libs.androidx.compose.ui.test.junit4)
15195}
15296
153- // Kover
97+ extra[" robolectricConfiguration" ] = " testImplementation"
98+ apply (from = " $rootDir /gradle/robolectric.gradle.kts" )
99+
154100dependencies {
155101 kover(project(" :curiosity" ))
156102 kover(project(" :navigation" ))
0 commit comments