@@ -8,8 +8,8 @@ evaluationDependsOn(':inspectit.shared.all')
8
8
defaultTasks ' releaseAndAnalyze'
9
9
10
10
/* * used by the eclipse buildship plugin */
11
- sourceCompatibility = ' 1.5 '
12
- targetCompatibility = ' 1.5 '
11
+ sourceCompatibility = ' 1.6 '
12
+ targetCompatibility = ' 1.6 '
13
13
14
14
/* * defined to have it included in Eclipse as source */
15
15
sourceSets {
@@ -23,7 +23,7 @@ sourceSets {
23
23
/* * Some agent specific properties */
24
24
ext {
25
25
distJarName = ' inspectit-agent'
26
- releaseNameSun15 = " inspectit-agent-sun1.5 -${ versionInfo} .zip"
26
+ releaseName = " inspectit-agent-java6 -${ versionInfo} .zip"
27
27
}
28
28
29
29
/* * Setting compile configuration as plugin in Eclipse needs it */
@@ -43,17 +43,12 @@ dependencies {
43
43
testCompile project (path : ' :inspectit.shared.all' , configuration : ' testArchives' )
44
44
}
45
45
46
- /* * Compile compatibility to 1.5 for all compile tasks */
46
+ /* * Compile compatibility to 1.6 for all compile tasks */
47
47
tasks. withType(JavaCompile ) { t ->
48
- // jmh can not run with java 1.5
49
- if (! (t. getName(). contains(' jmh' ) || t. getName(). contains(' Jmh' ))) {
50
- sourceCompatibility = ' 1.5'
51
- targetCompatibility = ' 1.5'
48
+ sourceCompatibility = ' 1.6'
49
+ targetCompatibility = ' 1.6'
52
50
53
- options. bootClasspath = configurations. java15rt. asPath
54
- // Used to suppress the warning that source value 1.5 will be obsolete in the future.
55
- options. compilerArgs << ' -Xlint:-options'
56
- }
51
+ options. bootClasspath = configurations. java16rt. asPath
57
52
}
58
53
59
54
@@ -66,15 +61,26 @@ cobertura {
66
61
* Creates the jar. Excludes libs from the configurations.agentJavaProd that are not Java5 compatible. Uses existing manifest.
67
62
*/
68
63
jar {
64
+ // use jarCheck to make sure all classes in our dependencies are at maximum in version 1.6
65
+ doFirst {
66
+ def jarCheckOutput = new File (" $buildRoot /jarCheck" )
67
+ jarCheckOutput. mkdirs()
68
+ configurations. agentJavaProd. each { file ->
69
+ def name = file. name
70
+ javaexec {
71
+ classpath configurations. jarCheck
72
+ main = ' com.mindprod.jarcheck.JarCheck'
73
+ args = [" $file " , " 1.0" , " 1.6" ]
74
+ standardOutput = new File (jarCheckOutput, " $name -check.log" ). newOutputStream()
75
+ }
76
+ }
77
+ }
78
+
69
79
archivesBaseName = distJarName
70
-
80
+
71
81
into(' libs' ) {
72
82
from project(' :inspectit.shared.all' ). jar. outputs
73
83
from configurations. agentJavaProd
74
-
75
- // exclude due to the incompatibility with Java5
76
- exclude(' validation-api*' )
77
- exclude(' hibernate-jpa-2.1-api*' )
78
84
}
79
85
80
86
manifest {
@@ -86,10 +92,10 @@ jar {
86
92
* Creates the release package.
87
93
*/
88
94
task release (type : Zip , dependsOn : jar) {
89
- description = " Releases the ${ releaseNameSun15 } package."
95
+ description = " Releases the ${ releaseName } package."
90
96
group = ' Release'
91
97
destinationDir = file(buildReleasePackages)
92
- archiveName = releaseNameSun15
98
+ archiveName = releaseName
93
99
into(' agent' ) {
94
100
from jar. outputs
95
101
from file(mainExtResources)
@@ -98,7 +104,7 @@ task release (type: Zip, dependsOn: jar) {
98
104
}
99
105
100
106
task releaseAndAnalyze {
101
- description = " Runs all unit tests, all checks and releases the ${ releaseNameSun15 } package."
107
+ description = " Runs all unit tests, all checks and releases the ${ releaseName } package."
102
108
group = ' Release'
103
109
dependsOn(analyze, release)
104
110
}
0 commit comments