aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorStefan Schmidt <ubschmidt2@users.noreply.github.com>2017-07-01 11:04:14 +0200
committerGitHub <noreply@github.com>2017-07-01 11:04:14 +0200
commit9e46aeb1b1a9bbc94829eb42ae99c95bd095c4e5 (patch)
treeff6898662bc7917ec777143e9efa167db7c3506f /contrib
parent39ac27f3005d647c7825714ea5c5b5c0a5a84fda (diff)
parent7ac5f413d93580f5c667f3893649059ab6680d6f (diff)
downloadplatform_external_opencensus-java-9e46aeb1b1a9bbc94829eb42ae99c95bd095c4e5.tar.gz
platform_external_opencensus-java-9e46aeb1b1a9bbc94829eb42ae99c95bd095c4e5.tar.bz2
platform_external_opencensus-java-9e46aeb1b1a9bbc94829eb42ae99c95bd095c4e5.zip
Merge pull request #402 from ubschmidt2/retro
Added experimental support for legacy Java 1.6 JVMs through Retrolambda.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/agent/build.gradle18
1 files changed, 13 insertions, 5 deletions
diff --git a/contrib/agent/build.gradle b/contrib/agent/build.gradle
index 72478a07..d2d5fd69 100644
--- a/contrib/agent/build.gradle
+++ b/contrib/agent/build.gradle
@@ -1,11 +1,19 @@
plugins {
id 'com.github.johnrengelman.shadow' version '2.0.0'
+ id 'me.tatarka.retrolambda' version '3.6.0'
}
description = 'OpenCensus Agent'
-sourceCompatibility = 1.7
-targetCompatibility = 1.7
+sourceCompatibility = JavaVersion.VERSION_1_7
+targetCompatibility = JavaVersion.VERSION_1_7
+
+// Experimental support for legacy Java 1.6 JVMs. Animalsniffer (applied by the root project) is
+// used to check for unexpected references to later APIs. Also see dependencies/signature.
+// Retrolambda itself requires JDK 8, which it finds at $JAVA8_HOME.
+retrolambda {
+ javaVersion JavaVersion.VERSION_1_6
+}
def agentPackage = 'io.opencensus.contrib.agent'
def agentMainClass = "${agentPackage}.AgentMain"
@@ -24,7 +32,7 @@ def agentRepackaged = "${agentPackage}.deps"
dependencies {
compile group: 'net.bytebuddy', name: 'byte-buddy', version: '1.7.1'
- signature 'org.codehaus.mojo.signature:java17:+@signature'
+ signature 'org.codehaus.mojo.signature:java16:+@signature'
}
jar {
@@ -35,8 +43,8 @@ jar {
attributes 'Can-Retransform-Classes': true
// Let the java plugin use the overridden values instead of the root project's values.
- attributes 'Source-Compatibility': sourceCompatibility
- attributes 'Target-Compatibility': targetCompatibility
+ attributes 'Source-Compatibility': JavaVersion.VERSION_1_6
+ attributes 'Target-Compatibility': JavaVersion.VERSION_1_6
}
}