File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
examples/kotlin-multiplatform Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ buildscript {
5
5
repositories {
6
6
maven { url ' https://maven.pkg.jetbrains.space/kotlin/p/kotlinx/maven' }
7
7
gradlePluginPortal()
8
+ google()
8
9
9
10
KotlinCommunity . addDevRepositoryIfEnabled(delegate, project)
10
11
}
@@ -21,6 +22,7 @@ buildscript {
21
22
classpath(" org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion " )
22
23
}
23
24
}
25
+ classpath " com.android.tools.build:gradle:8.2.2"
24
26
}
25
27
}
26
28
Original file line number Diff line number Diff line change @@ -4,13 +4,37 @@ plugins {
4
4
id ' org.jetbrains.kotlin.multiplatform'
5
5
id ' org.jetbrains.kotlin.plugin.allopen' version " 1.9.21"
6
6
id ' org.jetbrains.kotlinx.benchmark'
7
+ id ' com.android.library'
7
8
}
8
9
9
10
// how to apply plugin to a specific source set?
10
11
allOpen {
11
12
annotation(" org.openjdk.jmh.annotations.State" )
12
13
}
13
14
15
+ android {
16
+ compileSdk 34
17
+ namespace = " org.jetbrains.kotlinx.examples"
18
+
19
+ defaultConfig {
20
+ minSdk = 29
21
+ targetSdk = 34
22
+ versionCode = 1
23
+ versionName = " 1.0"
24
+
25
+ testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
26
+ }
27
+
28
+ buildTypes {
29
+ release {
30
+ }
31
+ }
32
+ compileOptions {
33
+ sourceCompatibility = JavaVersion . VERSION_1_8
34
+ targetCompatibility = JavaVersion . VERSION_1_8
35
+ }
36
+ }
37
+
14
38
kotlin {
15
39
jvm {
16
40
compilations. create(' benchmark' ) { associateWith(compilations. main) }
@@ -28,6 +52,9 @@ kotlin {
28
52
linuxX64()
29
53
mingwX64()
30
54
55
+ androidTarget {
56
+ }
57
+
31
58
applyDefaultHierarchyTemplate()
32
59
33
60
targets. configureEach {
@@ -59,6 +86,8 @@ kotlin {
59
86
}
60
87
61
88
nativeMain {}
89
+
90
+ androidMain {}
62
91
}
63
92
}
64
93
@@ -133,6 +162,7 @@ benchmark {
133
162
register(" macosArm64" )
134
163
register(" linuxX64" )
135
164
register(" mingwX64" )
165
+ register(" android" )
136
166
}
137
167
}
138
168
You can’t perform that action at this time.
0 commit comments