Skip to content

Commit

Permalink
Remove support for java7 from buildscripts (#1229)
Browse files Browse the repository at this point in the history
* Remove support for java7 from buildscripts

* Remove support for java7 from buildscripts
  • Loading branch information
iNikem authored Sep 23, 2020
1 parent bb50fe7 commit e74ffe2
Show file tree
Hide file tree
Showing 59 changed files with 9 additions and 270 deletions.
1 change: 0 additions & 1 deletion benchmark-integration/play-perftest/play-perftest.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ afterEvaluate {
}

ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
playVersion = "2.6.20"
scalaVersion = System.getProperty("scala.binary.version", /* default = */ "2.12")
}
Expand Down
13 changes: 1 addition & 12 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (applyCodeCoverage) {
if (project.hasProperty("minJavaVersionForTests")) {
project.ext.release = project.getProperty("minJavaVersionForTests")
} else {
project.ext.release = JavaVersion.VERSION_1_7
project.ext.release = JavaVersion.VERSION_1_8
}

java {
Expand Down Expand Up @@ -173,13 +173,6 @@ project.afterEvaluate {
}
}

if (project.hasProperty("removeJarVersionNumbers") && removeJarVersionNumbers) {
tasks.withType(AbstractArchiveTask).configureEach {
version = null
}
}


if (!rootProject.ext.has("javaExecutableVersionCache")) {
rootProject.ext.javaExecutableVersionCache = [:]
}
Expand Down Expand Up @@ -261,10 +254,6 @@ def addTestRule(String testTaskName) {
tasks.withType(Test).all {
executable = toExecutable(javaHomeForTests)
enabled = isJavaVersionAllowed(requestedJavaVersion)
if (requestedJavaVersion.isJava7()) {
// Disable JIT for this method. Sometimes Java7 JVM crashes trying to compile it.
jvmArgs '-XX:CompileCommand=exclude,net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType'
}
}
} else {
throw new BuildCancelledException("Requested java version $requestedJavaVersion not found")
Expand Down
4 changes: 0 additions & 4 deletions instrumentation-core/reactor-3.1/reactor-3.1.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
* limitations under the License.
*/

ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

group = 'io.opentelemetry.instrumentation'

apply from: "$rootDir/gradle/instrumentation-library.gradle"
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/akka-http-10.0/akka-http-10.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"
apply from: "$rootDir/gradle/test-with-scala.gradle"
apply plugin: 'org.unbroken-dome.test-sets'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
4 changes: 0 additions & 4 deletions instrumentation/armeria-1.0/auto/armeria-1.0-auto.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation-library.gradle"
apply plugin: "net.ltgt.errorprone"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation-library.gradle"

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation-library.gradle"

dependencies {
Expand Down
11 changes: 1 addition & 10 deletions instrumentation/cassandra/cassandra-3.0/cassandra-3.0.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
// Set properties before any plugins get loaded
ext {
// TODO switch to container-based tests (away from cassandraunit)
// Tests use cassandraunit, which runs embedded Cassandra 3, which requires Java 8
// (and is currently incompatible with Java 9.)
minJavaVersionForTests = JavaVersion.VERSION_1_8
// Tests use cassandraunit, which runs embedded Cassandra 3, which is currently incompatible with Java 9.
maxJavaVersionForTests = JavaVersion.VERSION_1_8
cassandraDriverTestVersions = "[3.0,4.0)"
}

apply from: "$rootDir/gradle/instrumentation.gradle"

// TODO switch to container-based tests (away from cassandraunit)
// then we can run tests using Java 7 (see above) and won't need this override section
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}

muzzle {

pass {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
maxJavaVersionForTests = JavaVersion.VERSION_1_8
cassandraDriverTestVersions = "[4.0,)"
}
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/couchbase/couchbase-2.0/couchbase-2.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/couchbase/couchbase-2.6/couchbase-2.6.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/finatra-2.9/finatra-2.9.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"
apply from: "$rootDir/gradle/test-with-scala.gradle"

Expand Down
5 changes: 0 additions & 5 deletions instrumentation/geode-1.4/geode-1.4.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Geode only supports Java 8+
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
4 changes: 0 additions & 4 deletions instrumentation/grizzly-client-1.9/grizzly-client-1.9.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
3 changes: 2 additions & 1 deletion instrumentation/hibernate/hibernate-4.3/hibernate-4.3.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ dependencies {

testLibrary group: 'org.hibernate', name: 'hibernate-entitymanager', version: '4.3.0.Final'
testImplementation group: 'org.hsqldb', name: 'hsqldb', version: '2.0.0'
testLibrary group: 'org.springframework.data', name: 'spring-data-jpa', version: '1.5.1.RELEASE'
//First version to work with Java 14
testLibrary group: 'org.springframework.data', name: 'spring-data-jpa', version: '1.8.0.RELEASE'

// TODO(anuraaga): Investigate why these tests don't pass on 5 or 6
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/1042
Expand Down
6 changes: 0 additions & 6 deletions instrumentation/java-concurrent/java-concurrent.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
ext {
// TODO (trask) currently this is only needed for LambdaGen
// revisit if we don't end up dropping Java 7
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
4 changes: 0 additions & 4 deletions instrumentation/khttp-0.1/khttp-0.1.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
6 changes: 0 additions & 6 deletions instrumentation/kotlin-coroutines/kotlin-coroutines.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
ext {
// TODO (trask) currently this is only needed for LambdaGen
// revisit if we don't end up dropping Java 7
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"
apply from: "$rootDir/gradle/test-with-kotlin.gradle"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
apply from: "$rootDir/gradle/instrumentation.gradle"

ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

muzzle {
pass {
group = "io.kubernetes"
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/lettuce/lettuce-4.0/lettuce-4.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/lettuce/lettuce-5.0/lettuce-5.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/lettuce/lettuce-5.1/lettuce-5.1.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"

muzzle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation-library.gradle"

dependencies {
Expand Down
6 changes: 0 additions & 6 deletions instrumentation/mongo/mongo-async-3.3/mongo-async-3.3.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Set properties before any plugins get loaded
ext {
// Since we're using CompletableFutures in the test...
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/netty/netty-3.8/netty-3.8.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

Expand Down
5 changes: 0 additions & 5 deletions instrumentation/netty/netty-4.0/netty-4.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/netty/netty-4.1/netty-4.1.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/play-ws/play-ws-1.0/play-ws-1.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/play-ws/play-ws-2.0/play-ws-2.0.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/play-ws/play-ws-2.1/play-ws-2.1.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/play-ws/play-ws-common/play-ws-common.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "$rootDir/gradle/instrumentation.gradle"

def scalaVersion = '2.12'
Expand Down
Loading

0 comments on commit e74ffe2

Please sign in to comment.