File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
- import conventions.androidLibraryConventions
1
+ import conventions.androidConventions
2
2
import conventions.binaryCompatibilityValidatorConventions
3
3
import conventions.kotlinMultiplatformConventions
4
4
import org.gradle.api.Plugin
@@ -10,7 +10,7 @@ class EvasBuildPlugin : Plugin<Project> {
10
10
group = " io.sellmair"
11
11
12
12
target.kotlinMultiplatformConventions()
13
- target.androidLibraryConventions ()
13
+ target.androidConventions ()
14
14
target.binaryCompatibilityValidatorConventions()
15
15
}
16
16
}
Original file line number Diff line number Diff line change 1
1
package conventions
2
2
3
- import com.android.build.gradle.LibraryExtension
3
+ import com.android.build.gradle.TestedExtension
4
4
import org.gradle.api.JavaVersion
5
5
import org.gradle.api.Project
6
6
import org.gradle.kotlin.dsl.configure
7
7
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
8
8
9
- fun Project.androidLibraryConventions () {
10
- plugins.withId( " com.android.library " ) {
11
- extensions.configure<LibraryExtension > {
12
- compileSdk = 34
9
+ fun Project.androidConventions () {
10
+ fun configureDefaults ( ) {
11
+ extensions.configure<TestedExtension > {
12
+ setCompileSdkVersion( 35 )
13
13
defaultConfig {
14
14
minSdk = 15
15
- namespace = " io.sellmair.${project.name} "
15
+ namespace = " io.sellmair.${project.name.replace( " - " , " . " ) } "
16
16
}
17
17
18
18
compileOptions {
19
19
this .sourceCompatibility = JavaVersion .VERSION_11
20
20
this .targetCompatibility = JavaVersion .VERSION_11
21
21
}
22
22
}
23
+ }
24
+
25
+ plugins.withId(" com.android.library" ) {
26
+ configureDefaults()
23
27
24
28
extensions.configure<KotlinMultiplatformExtension > {
25
29
androidTarget().publishLibraryVariants(" release" )
26
30
}
27
31
}
32
+
33
+ plugins.withId(" com.android.application" ) {
34
+ configureDefaults()
35
+ }
28
36
}
You can’t perform that action at this time.
0 commit comments