-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
71 lines (58 loc) · 1.52 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
plugins {
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.4.21'
id "org.jetbrains.kotlin.kapt" version "1.4.21"
}
group = 'com.druk'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
task swiftBuild(type: Exec) {
environment("TOOLCHAINS", "")
workingDir 'src/main/swift'
commandLine 'swift', 'build'
}
task swiftPackageClean(type: Exec) {
environment("TOOLCHAINS", "")
workingDir 'src/main/swift'
commandLine 'swift', 'package', 'clean'
}
task swiftPackageUpdate(type: Exec) {
environment("TOOLCHAINS", "")
workingDir 'src/main/swift'
commandLine 'swift', 'package', 'update'
}
compileJava.finalizedBy(swiftBuild)
test {
systemProperty "java.library.path", file("${buildDir}/../src/main/swift/.build/debug").absolutePath
}
dependencies {
kapt "com.readdle.swift.java.codegen:compiler:0.9.2"
implementation "com.readdle.swift.java.codegen:annotations:0.9.2"
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
}
test {
useJUnit()
}
kapt {
arguments {
arg("com.readdle.codegen.package", """{
"moduleName": "SampleProject",
"importPackages": [],
"customTypeMappings": {
"com.readdle.swiftjava.sample.CustomSampleValue": "SampleValue"
}
}
""")
}
}
compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
}
application {
mainClassName = 'MainKt'
}