forked from inspectIT/inspectIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inspectit.shared.cs.gradle
64 lines (55 loc) · 1.47 KB
/
inspectit.shared.cs.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
/**
* Gradle build file for the inspectit.shared.cs project.
*
* @author Rene Kugel
* @author Ivan Senic
*/
evaluationDependsOn(':inspectit.shared.all')
defaultTasks 'releaseAndAnalyze'
/** used by the eclipse buildship plugin */
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
/** Artifact names */
ext {
distJarName = 'inspectit-shared-cs'
pluginName = 'rocks.inspectit.shared.cs'
}
/** Setting compile configuration as plugin in Eclipse needs it */
configurations {
compile {
extendsFrom configurations.sharedCsProd
}
testCompile {
extendsFrom configurations.sharedCsTest
}
}
/** Depend on inspectit.shared.all, testCompile must depend on shared all test sources because of TestBase class */
dependencies {
compile project(':inspectit.shared.all')
testCompile project (path: ':inspectit.shared.all', configuration: 'testArchives')
}
/** Compile compatibility to 1.8 for all compile tasks */
tasks.withType(JavaCompile) {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
/**
* Creates the jar. If needed update the version in the MANIFEST.MF.
*/
jar {
archivesBaseName = distJarName
manifest {
from ("${mainResources}/META-INF/MANIFEST.MF") {
eachEntry { details ->
if (details.key == 'Bundle-Version' && project.hasProperty('versionInfo')) {
details.value = versionInfo
}
}
}
}
}
task releaseAndAnalyze {
description = "Runs all unit tests, all checks and assembles a jar archive."
group = 'Release'
dependsOn(analyze, jar)
}