-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
66 lines (63 loc) · 2.77 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
import org.gradle.api.JavaVersion.*
import org.gradle.api.tasks.wrapper.Wrapper.*
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.*
import org.gradle.kotlin.dsl.*
import java.io.File
import java.lang.Runtime.*
plugins {
id("biz.aQute.bnd.builder")/*substitutes `java`*/version "3.3.0" // "4.0.0-SNAPSHOT" for real {@see settings.gradle.kts}
}
group = extra["projectGroup"]!!
version = extra["projectVersion"] as String
repositories {
//extra["mavenAddRepo"].toString().split(" ").forEach { maven(url = it) }
maven( url = "https://oss.sonatype.org/content/groups/osgi/")
jcenter()
}
java { sourceCompatibility = VERSION_1_8 }
tasks {
withType<JavaCompile> {
options.apply {
encoding = "UTF-8"
isIncremental = true
/*
* compiler deamon JVM options
* omitted for this demo
*/
isFork = true
/*
* javac tasks args
*/
// TODO: @argFile does does not work for some reason. Bug ?
//compilerArgs.add("@" + project.rootDir.absolutePath.replace(Regex("\\s+"), " \"\$1\"").replace('\\', '/') + "/javac" + current().majorVersion + "Args")
File(project.rootDir.absolutePath + "/javac"+current().majorVersion+"Args").useLines { lines -> lines.forEach { compilerArgs.add(it) }}
}
}
withType<Test> {
testLogging.showStandardStreams = project.extra["isShowStdStreamsOnTests"].toString().toBoolean()
maxParallelForks = getRuntime().availableProcessors()
forkEvery = 100
reports.html.isEnabled = false
reports.junitXml.isEnabled = false
}
withType<Wrapper> {
description = "Generating the Gradle wrapper scripts"
gradleVersion = project.extra["gradleWrapperVersion"] as String
distributionType = ALL
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
}
dependencies {
compileOnly("org.osgi", "osgi.core", "6.0.0")
compileOnly("org.osgi", "osgi.cmpn", "6.0.0")
compileOnly("org.osgi", "osgi.enterprise", "6.0.0")
compileOnly("org.osgi", "org.osgi.annotation.versioning", "1.0.0")
implementation("org.apache.aries.blueprint", "org.apache.aries.blueprint.cm", "1.1.0")
implementation("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint", "2.1.0")
implementation("org.hibernate", "hibernate-core", "5.2.11.Final") {
exclude("org.javassist", "javassist")
}
// for las version 2.3.0 on JDK 9 bnd complains adout classpath is wrong due to multirelease jar
implementation("javax.xml.bind", "jaxb-api", "2.3.0-b170201.1204")
testImplementation("junit", "junit", "4.12")
}