-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
125 lines (106 loc) · 2.62 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
122
123
124
125
buildscript {
ext.kotlin_version = "1.9.0"
dependencies {
classpath "com.android.tools.build:gradle:8.0.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'org.jetbrains.kotlin.multiplatform' version "$kotlin_version"
id 'com.android.library'
id 'maven-publish'
}
group = 'com.github.UstadMobile'
version = '0.0.26'
def localProperties = new Properties()
if(project.file("local.properties").exists()) {
localProperties.load(new FileInputStream(project.file("local.properties")))
}
repositories {
google()
mavenCentral()
}
kotlin {
//As per https://developer.android.com/build/jdks#toolchain
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
jvm {
compilations.all {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17
}
testRuns["test"].executionTask.configure {
useJUnit()
}
}
js(IR) {
browser {
testTask {
useKarma {
useChromeHeadless() //change to useChrome to run the actual browser
}
}
}
}
androidTarget {
publishLibraryVariants("release", "debug")
}
sourceSets {
commonMain {
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
}
jvmMain {
dependencies {
implementation "net.sf.kxml:kxml2:2.3.0"
}
}
jvmTest {
dependencies {
implementation kotlin('test-junit')
}
}
jsMain {
}
jsTest {
dependencies {
implementation kotlin('test-js')
}
}
androidMain {
dependencies {
}
}
androidTest {
dependencies {
implementation kotlin('test-junit')
implementation 'junit:junit:4.13.2'
}
}
}
}
android {
compileSdk 33
sourceSets.main.manifest.srcFile('src/androidMain/AndroidManifest.xml')
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
namespace 'org.kmp.xmlpullparser.library'
}
publishing {
repositories {
//Set this in local.properties
maven {
url localProperties["repo.dir"]
}
}
}