-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (56 loc) · 1.47 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
buildscript {
ext {
kotlinVersion = '1.3.30'
ktlintGradleVersion = '9.1.1'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jlleitschuh.gradle:ktlint-gradle:${ktlintGradleVersion}")
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
}
apply plugin: 'org.jlleitschuh.gradle.ktlint'
apply plugin: 'maven'
group 'com.alphasights'
version '0.1.1'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
def generatedSources = "$buildDir/generated-resources/main/"
sourceSets.main.kotlin.srcDirs += generatedSources + "kotlin"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile group: "com.twilio.sdk", name: "twilio", version: "9.15.1"
testImplementation('org.junit.jupiter:junit-jupiter:5.5.1')
}
test {
useJUnitPlatform()
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
task generate(type:Exec) {
def outputDir = generatedSources + "/kotlin/com/alphasights/kotlintwilio/"
doFirst {
mkdir(outputDir)
}
workingDir '.'
commandLine 'python', 'contrib/codegen/generate.py', 'contrib/codegen/layout.json', outputDir + "KotlinTwimlDsl.kt"
}
compileKotlin.dependsOn generate