-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
100 lines (81 loc) · 2.44 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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'biz.aQute.bnd.builder' version '5.1.2'
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
id 'java-library'
id 'jacoco'
id 'org.sonarqube' version '3.0'
}
project.tasks["sonarqube"].dependsOn "test"
project.ext {
jarDefaultImportPackageVersion = ";version=0"
}
repositories {
jcenter()
}
apply from: "configuration.gradle"
def internalFolder = 'gradle/develop/'
def folder = new File(internalFolder)
if (folder.exists()) {
apply from: internalFolder + "ascii.gradle"
apply from: internalFolder + "jacoco.gradle"
apply from: internalFolder + "extensions.gradle"
apply from: internalFolder + "release.gradle"
}
configure(subprojects) {
apply plugin: "java-library"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "biz.aQute.bnd.builder"
apply plugin: "jacoco"
apply plugin: "maven-publish"
group = cfgGroup
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
if (!project.properties.containsKey('cfgJavaVersion')) {
project.ext {
cfgJavaVersion = '1.11'
}
}
repositories {
mavenCentral()
}
compileJava {
options.compilerArgs << '-Xlint:unchecked'
options.compilerArgs << '-Xlint:deprecation'
}
sourceSets {
sample
itest {
compileClasspath += sourceSets.main.runtimeClasspath
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testImplementation 'org.mockito:mockito-core:2.21.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.11'
}
jar {
bnd('Bundle-Name': project.name,
'Bundle-Vendor': 'Fraunhofer ISE',
'Bundle-SymbolicName': project.group + '.' + project.name)
destinationDirectory = new File("$rootDir/build/libs-all")
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
eclipse.pathVariables([GRADLE_USER_HOME: file(gradle.gradleUserHomeDir)])
tasks.eclipse.dependsOn(cleanEclipse)
javadoc {
exclude "**/internal/**"
exclude "**/java-gen/**"
}
}