1
1
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
2
2
3
3
plugins {
4
- alias(libs.plugins.multiplatform)
5
- alias(libs.plugins.serialization)
6
- alias(libs.plugins.atomicfu)
7
- alias(libs.plugins.android.library)
4
+ alias(libs.plugins.multiplatform)
5
+ alias(libs.plugins.serialization)
6
+ alias(libs.plugins.atomicfu)
7
+ alias(libs.plugins.android.library)
8
8
}
9
9
10
10
kotlin {
11
- jvmToolchain(21 )
12
-
13
- jvm()
14
-
15
- androidTarget {
16
- publishLibraryVariants(" release" , " debug" )
17
- }
18
-
19
- js {
20
- browser {
21
- webpackTask {
22
- mainOutputFileName = " yutorix-satori-adapter.js"
23
- }
24
- }
25
- nodejs()
26
- binaries.library()
27
- }
28
-
29
- @OptIn(ExperimentalWasmDsl ::class )
30
- wasmJs {
31
- browser {
32
- webpackTask {
33
- mainOutputFileName = " yutorix-satori-adapter.js"
34
- }
35
- }
36
- nodejs()
37
- binaries.library()
38
- }
39
-
40
- // Apple(IOS & MacOS)
41
- listOf (
42
- iosX64(),
43
- iosArm64(),
44
- iosSimulatorArm64(),
45
- macosX64(),
46
- macosArm64()
47
- ).forEach {
48
- it.binaries.framework {
49
- baseName = " yutorix-satori-adapter"
50
- isStatic = true
51
- }
52
- }
53
-
54
- // Linux
55
- listOf (
56
- linuxX64(),
57
- linuxArm64()
58
- ).forEach {
59
- it.binaries.staticLib {
60
- baseName = " yutorix-satori-adapter"
61
- }
62
- }
63
-
64
- // Windows
65
- mingwX64 {
66
- binaries.staticLib {
67
- baseName = " yutorix-satori-adapter"
68
- }
69
- }
70
-
71
- sourceSets {
72
- commonMain.dependencies {
73
- implementation(libs.yutori)
74
- implementation(project(" :yutorix-satori-core" ))
75
- api(libs.ktor.client.core)
76
- api(libs.ktor.client.content.negotiation)
77
- }
78
-
79
- jvmMain.dependencies {
80
- api(libs.ktor.client.okhttp)
81
- }
82
-
83
- androidMain.dependencies {
84
- api(libs.ktor.client.okhttp)
85
- }
86
-
87
- jsMain.dependencies {
88
- api(libs.ktor.client.js)
89
- }
90
-
91
- wasmJsMain.dependencies {
92
- api(libs.ktor.client.js)
93
- }
94
-
95
- appleMain.dependencies {
96
- api(libs.ktor.client.darwin)
97
- }
98
-
99
- linuxMain.dependencies {
100
- api(libs.ktor.client.curl)
101
- }
102
-
103
- mingwMain.dependencies {
104
- api(libs.ktor.client.winhttp)
105
- }
106
- }
11
+ jvmToolchain(21 )
12
+
13
+ jvm()
14
+
15
+ androidTarget {
16
+ publishLibraryVariants(" release" , " debug" )
17
+ }
18
+
19
+ js {
20
+ browser {
21
+ webpackTask {
22
+ mainOutputFileName = " yutorix-satori-adapter.js"
23
+ }
24
+ }
25
+ nodejs()
26
+ binaries.library()
27
+ }
28
+
29
+ @OptIn(ExperimentalWasmDsl ::class )
30
+ wasmJs {
31
+ browser {
32
+ webpackTask {
33
+ mainOutputFileName = " yutorix-satori-adapter.js"
34
+ }
35
+ }
36
+ nodejs()
37
+ binaries.library()
38
+ }
39
+
40
+ // Apple(IOS & MacOS)
41
+ listOf (
42
+ iosX64(),
43
+ iosArm64(),
44
+ iosSimulatorArm64(),
45
+ macosX64(),
46
+ macosArm64()
47
+ ).forEach {
48
+ it.binaries.framework {
49
+ baseName = " yutorix-satori-adapter"
50
+ isStatic = true
51
+ }
52
+ }
53
+
54
+ // Linux
55
+ listOf (
56
+ linuxX64(),
57
+ linuxArm64()
58
+ ).forEach {
59
+ it.binaries.staticLib {
60
+ baseName = " yutorix-satori-adapter"
61
+ }
62
+ }
63
+
64
+ // Windows
65
+ mingwX64 {
66
+ binaries.staticLib {
67
+ baseName = " yutorix-satori-adapter"
68
+ }
69
+ }
70
+
71
+ sourceSets {
72
+ commonMain.dependencies {
73
+ implementation(libs.yutori)
74
+ implementation(project(" :yutorix-satori-core" ))
75
+ api(libs.ktor.client.core)
76
+ api(libs.ktor.client.content.negotiation)
77
+ }
78
+ }
107
79
}
108
80
109
81
android {
110
- namespace = " cn.yurn.yutorix.satori.adapter"
111
- compileSdk = 34
112
-
113
- defaultConfig {
114
- minSdk = 24
115
- }
116
- compileOptions {
117
- sourceCompatibility = JavaVersion .VERSION_21
118
- sourceCompatibility = JavaVersion .VERSION_21
119
- }
82
+ namespace = " cn.yurn.yutorix.satori.adapter"
83
+ compileSdk = 34
84
+
85
+ defaultConfig {
86
+ minSdk = 24
87
+ }
88
+ compileOptions {
89
+ sourceCompatibility = JavaVersion .VERSION_21
90
+ sourceCompatibility = JavaVersion .VERSION_21
91
+ }
120
92
}
121
93
122
94
publishing {
123
- publications.withType<MavenPublication > {
124
- pom {
125
- name = " Yutorix-Satori-Adapter"
126
- version = System .getenv(" VERSION" )
127
- description = " Kotlin Multiplatform library"
128
- url = " https://github.com/Nyayurn/yutorix-satori"
129
-
130
- developers {
131
- developer {
132
- id = " Nyayurn"
133
- name = " Yurn"
134
-
135
- }
136
- }
137
- scm {
138
- url = " https://github.com/Nyayurn/yutorix-satori"
139
- }
140
- }
141
- }
95
+ publications.withType<MavenPublication > {
96
+ pom {
97
+ name = " Yutorix-Satori-Adapter"
98
+ version = System .getenv(" VERSION" )
99
+ description = " Kotlin Multiplatform library"
100
+ url = " https://github.com/Nyayurn/yutorix-satori"
101
+
102
+ developers {
103
+ developer {
104
+ id = " Nyayurn"
105
+ name = " Yurn"
106
+
107
+ }
108
+ }
109
+ scm {
110
+ url = " https://github.com/Nyayurn/yutorix-satori"
111
+ }
112
+ }
113
+ }
142
114
}
0 commit comments