-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
140 lines (117 loc) · 3.92 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
126
127
128
129
130
131
132
133
134
135
136
137
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.72"
id "org.jetbrains.kotlin.kapt" version "1.3.72"
id "org.jetbrains.kotlin.plugin.allopen" version "1.3.72"
id "com.github.johnrengelman.shadow" version "6.0.0"
id "application"
id "org.jmailen.kotlinter" version "2.4.1"
}
version "0.1"
group "com.theoriginalcover.server"
repositories {
mavenCentral()
jcenter()
google()
}
configurations {
// for dependencies that are needed for development only
developmentOnly
}
dependencies {
kapt(platform("io.micronaut:micronaut-bom:$micronautVersion"))
kapt("io.micronaut:micronaut-inject-java")
kapt("io.micronaut:micronaut-validation")
implementation(platform("io.micronaut:micronaut-bom:$micronautVersion"))
implementation("io.micronaut:micronaut-inject")
implementation("io.micronaut:micronaut-validation")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
implementation("io.micronaut:micronaut-runtime")
implementation("javax.annotation:javax.annotation-api")
implementation("io.micronaut:micronaut-http-server-netty")
implementation("io.micronaut:micronaut-http-client")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
kaptTest(platform("io.micronaut:micronaut-bom:$micronautVersion"))
kaptTest("io.micronaut:micronaut-inject-java")
testImplementation(platform("io.micronaut:micronaut-bom:$micronautVersion"))
testImplementation("io.micronaut.test:micronaut-test-kotlintest")
testImplementation("io.mockk:mockk:1.9.3")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.3.2")
testImplementation(
'org.assertj:assertj-core:3.12.2',
'org.junit.jupiter:junit-jupiter-api:5.4.2'
)
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.4.2')
implementation("org.twitter4j:twitter4j-core:4.0.7")
implementation("org.twitter4j:twitter4j-async:4.0.7")
implementation("com.github.dozermapper:dozer-core:6.5.0")
implementation("javax.xml.bind:jaxb-api:2.3.1")
implementation("com.google.firebase:firebase-admin:6.11.0")
}
task stage(dependsOn: ['build', 'clean'])
build.mustRunAfter clean
test.classpath += configurations.developmentOnly
mainClassName = "com.theoriginalcover.server.ApplicationKt"
// use JUnit 5 platform
test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.toVersion('11')
}
allOpen {
annotation("io.micronaut.aop.Around")
}
compileKotlin {
kotlinOptions {
jvmTarget = '11'
//Will retain parameter names for Java reflection
javaParameters = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = '11'
javaParameters = true
}
}
kapt {
arguments {
arg("micronaut.processing.incremental", true)
arg("micronaut.processing.annotations", "com.theoriginalcover.server.*")
arg("micronaut.processing.group", "com.theoriginalcover.server")
arg("micronaut.processing.module", "tocserver")
}
}
shadowJar {
mergeServiceFiles()
}
/*jar {
manifest {
attributes 'Main-Class': 'com.theoriginalcover.server.ApplicationKt'
}
}*/
tasks.withType(JavaExec) {
classpath += configurations.developmentOnly
jvmArgs('-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
if (gradle.startParameter.continuous) {
systemProperties(
'micronaut.io.watch.restart':'true',
'micronaut.io.watch.enabled':'true',
"micronaut.io.watch.paths":"src/main"
)
}
}
kotlinter {
ignoreFailures = false
indentSize = 4
reporters = ['checkstyle', 'plain']
experimentalRules = false
disabledRules = [
'no-wildcard-imports',
'indent'
]
fileBatchSize = 30
}