-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (98 loc) · 2.88 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
buildscript {
repositories {
mavenLocal()
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath group: 'net.rubygrapefruit', name: 'native-platform', version: '0.21'
}
}
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.3.41'
}
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
group project.groupId
version project.kyugaVersion
def frameworkName = "KyugaIOS"
kotlin {
iosX64 {
binaries.framework {
baseName = frameworkName
}
}
iosArm64 {
binaries.framework {
baseName = frameworkName
}
}
iosArm32 {
binaries.framework {
baseName = frameworkName
}
}
jvm('android')
sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
commonTest.dependencies {
implementation "org.jetbrains.kotlin:kotlin-test-common"
implementation "org.jetbrains.kotlin:kotlin-test-annotations-common"
}
androidMain {
dependencies {
implementation(kotlin("stdlib"))
}
}
androidTest {
kotlin {
srcDir 'src/androidTest/kotlin'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-test-common"
implementation "org.jetbrains.kotlin:kotlin-test-annotations-common"
implementation "org.jetbrains.kotlin:kotlin-test-junit"
implementation "org.jetbrains.kotlin:kotlin-test"
implementation "org.json:json:20090211"
}
dependsOn commonMain
dependsOn androidMain
}
iosMain.dependencies {
}
iosMain {}
iosArm64Main.dependsOn iosMain
iosArm32Main.dependsOn iosMain
iosX64Main.dependsOn iosMain
iosTest {}
iosArm64Test.dependsOn iosTest
iosArm32Test.dependsOn iosTest
iosX64Test.dependsOn iosTest
}
}
configurations {
compileClasspath
}
task fatFramework(type: FatFrameworkTask) {
// The fat framework must have the same base name as the initial frameworks.
baseName = "$frameworkName"
// Specify the frameworks to be merged.
from(
kotlin.targets.iosX64.binaries.getFramework("RELEASE") ,
kotlin.targets.iosArm64.binaries.getFramework("RELEASE"),
kotlin.targets.iosArm32.binaries.getFramework("RELEASE")
)
}
apply from: rootProject.file('pom.gradle')
apply from: rootProject.file('gradle/publish.gradle')
tasks.build.dependsOn fatFramework