forked from intendia-oss/autorest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (62 loc) · 1.82 KB
/
build.gradle.kts
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
plugins {
java
`java-library`
`maven-publish`
id("com.github.johnrengelman.shadow") version "6.1.0" apply false
id("us.ascendtech.gwt.lib") version "0.5.9" apply false
id("us.ascendtech.gwt.modern") version "0.5.9" apply false
}
defaultTasks("build")
subprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
//withSourcesJar()
}
val sourcesJar = tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
artifacts.add("archives", sourcesJar)
defaultTasks("build")
group = "us.ascendtech.simplerest"
repositories {
mavenLocal()
mavenCentral()
}
configurations.all {
// check for updates every build more than 10 minutes apart (for snapshots)
resolutionStrategy.cacheChangingModulesFor(10, TimeUnit.MINUTES)
}
tasks.withType<JavaCompile> {
options.isDebug = true
options.debugOptions.debugLevel = "source,lines,vars"
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.2")
}
sourceSets {
main {
java {
srcDir("src/main/java")
}
resources {
srcDir("src/main/java")
}
}
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
}