File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,20 @@ android {
2121 sourceCompatibility = JavaVersion .VERSION_17
2222 targetCompatibility = JavaVersion .VERSION_17
2323 }
24+
25+ // Ensure a variant exists for the app's custom build type
26+ buildTypes {
27+ create(" internal" ) {
28+ initWith(getByName(" debug" ))
29+ matchingFallbacks + = listOf (" debug" , " release" )
30+ }
31+ }
2432}
2533
2634kotlin {
2735 androidTarget {
36+ // Publish debug, release, and internal variants for Android consumers
37+ publishLibraryVariants(" debug" , " release" , " internal" )
2838 compilerOptions {
2939 jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_17 )
3040 }
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ plugins {
77
88kotlin {
99 androidTarget {
10+ // Publish Android variants including custom 'internal' for app consumption
11+ publishLibraryVariants(" debug" , " release" , " internal" )
1012 compilerOptions {
1113 jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_17 )
1214 }
@@ -49,6 +51,14 @@ android {
4951 sourceCompatibility = JavaVersion .VERSION_17
5052 targetCompatibility = JavaVersion .VERSION_17
5153 }
54+
55+ // Ensure availability of an 'internal' build type for consumers
56+ buildTypes {
57+ create(" internal" ) {
58+ initWith(getByName(" debug" ))
59+ matchingFallbacks + = listOf (" debug" , " release" )
60+ }
61+ }
5262}
5363
5464repositories {
Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ android {
2424 sourceCompatibility = JavaVersion .VERSION_17
2525 targetCompatibility = JavaVersion .VERSION_17
2626 }
27+
28+ // Add an 'internal' build type so the app's custom build type can resolve a variant
29+ buildTypes {
30+ create(" internal" ) {
31+ initWith(getByName(" debug" ))
32+ matchingFallbacks + = listOf (" debug" , " release" )
33+ }
34+ }
2735}
2836
2937repositories {
@@ -38,6 +46,8 @@ dependencies {
3846
3947kotlin {
4048 androidTarget {
49+ // Publish all Android library variants used by the app, including the custom 'internal'
50+ publishLibraryVariants(" debug" , " release" , " internal" )
4151 compilerOptions {
4252 jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_17 )
4353 }
You can’t perform that action at this time.
0 commit comments