diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md
similarity index 100%
rename from CONTRIBUTING.md
rename to .github/CONTRIBUTING.md
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b1bb043c67d..91fbdb27c9d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -18,11 +18,10 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- - name: Install JDK and build project (without Gradle)
+ - name: Install JDK and build project
run: |
. ./.github/scripts/install-jdk.sh --feature ea --os linux-x64
- ./mvnw verify -Pjava14 -pl !byte-buddy-gradle-plugin
- ./mvnw verify -Pjava14 -pl !byte-buddy-gradle-plugin
+ ./mvnw verify -Pjava14
hotspot-supported:
name: HotSpot (supported)
strategy:
@@ -41,10 +40,6 @@ jobs:
architecture: x64
- name: Build project
run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }}
- if: matrix.java < 13
- - name: Build project (without Gradle)
- run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }} -pl !byte-buddy-gradle-plugin
- if: matrix.java > 12
hotspot-unsupported:
name: HotSpot (unsupported)
strategy:
@@ -90,12 +85,6 @@ jobs:
run: |
. ./.github/scripts/install-jdk.sh --url "https://api.adoptopenjdk.net/v2/binary/releases/openjdk${{ matrix.java }}?openjdk_impl=openj9&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal"
./mvnw verify -Pintegration -Pjava${{ matrix.java }}
- if: matrix.java < 13
- - name: Install JDK and build project (without Gradle)
- run: |
- . ./.github/scripts/install-jdk.sh --url "https://api.adoptopenjdk.net/v2/binary/releases/openjdk${{ matrix.java }}?openjdk_impl=openj9&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal"
- ./mvnw verify -Pintegration -Pjava${{ matrix.java }} -pl !byte-buddy-gradle-plugin
- if: matrix.java > 12
coverage:
name: Coverage
runs-on: ubuntu-18.04
diff --git a/.gitignore b/.gitignore
index 19528591618..3a4076745a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ site/
# Gradle
byte-buddy-gradle-plugin/build/
+byte-buddy-gradle-plugin/buildSrc
byte-buddy-gradle-plugin/gradle/build
.gradle/
diff --git a/byte-buddy-agent/pom.xml b/byte-buddy-agent/pom.xml
index 3a8135af6cf..801d0b927f9 100644
--- a/byte-buddy-agent/pom.xml
+++ b/byte-buddy-agent/pom.xml
@@ -69,7 +69,7 @@
net.bytebuddy
byte-buddy
- 1.10.2
+ 1.10.4
test
diff --git a/byte-buddy-agent/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java b/byte-buddy-agent/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java
index 545f9a56375..1388177b3c2 100644
--- a/byte-buddy-agent/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java
+++ b/byte-buddy-agent/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java
@@ -23,7 +23,7 @@ public class JavaVersionRule implements MethodRule {
public JavaVersionRule() {
currentVersion = ClassFileVersion.ofThisVm();
- openJ9 = System.getProperty("java.vm.vendor", "").toUpperCase(Locale.US).contains("J9");
+ openJ9 = System.getProperty("java.vm.name", "").toUpperCase(Locale.US).contains("J9");
}
public Statement apply(Statement base, FrameworkMethod method, Object target) {
@@ -40,9 +40,9 @@ public Statement apply(Statement base, FrameworkMethod method, Object target) {
if (openJ9 && !enforce.openJ9()) {
return new OpenJ9Statement();
} else if (enforce.value() != UNDEFINED && !version.isAtLeast(ClassFileVersion.ofJavaVersion(enforce.value()))) {
- return new NoOpStatement(enforce.value(), "at least");
+ return new NoOpStatement(enforce.value(), "at least", enforce.target());
} else if (enforce.atMost() != UNDEFINED && !version.isAtMost(ClassFileVersion.ofJavaVersion(enforce.atMost()))) {
- return new NoOpStatement(enforce.atMost(), "at most");
+ return new NoOpStatement(enforce.atMost(), "at most", enforce.target());
}
}
return base;
@@ -67,13 +67,18 @@ private static class NoOpStatement extends Statement {
private final String sort;
- private NoOpStatement(int requiredVersion, String sort) {
+ private final Class> target;
+
+ private NoOpStatement(int requiredVersion, String sort, Class> target) {
this.requiredVersion = requiredVersion;
this.sort = sort;
+ this.target = target;
}
public void evaluate() {
- Logger.getLogger("net.bytebuddy").warning("Ignoring test case: Requires a Java version of " + sort + " " + requiredVersion);
+ Logger.getLogger("net.bytebuddy").warning("Ignoring test case: Requires a Java version " +
+ "of " + sort + " " + requiredVersion
+ + (target == void.class ? "" : (" for target " + target)));
}
}
diff --git a/byte-buddy-dep/pom.xml b/byte-buddy-dep/pom.xml
index c3239d8d44b..c7fbffa810b 100644
--- a/byte-buddy-dep/pom.xml
+++ b/byte-buddy-dep/pom.xml
@@ -101,7 +101,7 @@
net.bytebuddy
byte-buddy-maven-plugin
- 1.10.2
+ 1.10.4
compile
@@ -116,13 +116,13 @@
net.bytebuddy
byte-buddy
- 1.10.2
+ 1.10.4
net.bytebuddy.build.HashCodeAndEqualsPlugin$WithNonNullableFields
net.bytebuddy
byte-buddy
- 1.10.2
+ 1.10.4
net.bytebuddy.build.CachedReturnPlugin
diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/description/annotation/AnnotationDescription.java b/byte-buddy-dep/src/main/java/net/bytebuddy/description/annotation/AnnotationDescription.java
index 6dd71a8cf92..0af3ffc3500 100644
--- a/byte-buddy-dep/src/main/java/net/bytebuddy/description/annotation/AnnotationDescription.java
+++ b/byte-buddy-dep/src/main/java/net/bytebuddy/description/annotation/AnnotationDescription.java
@@ -546,6 +546,7 @@ public S load() {
* @param annotation The annotation to convert.
* @return A mapping of property names to their annotation value.
*/
+ @SuppressWarnings("unchecked")
private static Map> asValue(Annotation annotation) {
Map> annotationValues = new HashMap>();
for (Method property : annotation.annotationType().getDeclaredMethods()) {
@@ -621,6 +622,7 @@ public S load() {
/**
* {@inheritDoc}
*/
+ @SuppressWarnings("deprecation")
@SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should always be wrapped for clarity")
public AnnotationValue, ?> getValue(MethodDescription.InDefinedShape property) {
if (!property.getDeclaringType().represents(annotation.annotationType())) {
@@ -1040,7 +1042,6 @@ public Builder defineTypeArray(String property, Class>... type) {
* @param typeDescription Descriptions of the types that should be contained by the array.
* @return A builder with the additional type array property.
*/
- @SuppressWarnings("unchecked")
public Builder defineTypeArray(String property, TypeDescription... typeDescription) {
return define(property, AnnotationValue.ForDescriptionArray.of(typeDescription));
}
diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/MethodCallTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/MethodCallTest.java
index 46f53616f33..6593abad59d 100644
--- a/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/MethodCallTest.java
+++ b/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/MethodCallTest.java
@@ -1114,6 +1114,7 @@ public void testConstructorIsAccessibleFromDifferentPackage() throws Exception {
.make()
.load(Foo.class.getClassLoader(), ClassLoadingStrategy.Default.WRAPPER)
.getLoaded()
+ .getConstructor()
.newInstance(), instanceOf(ProtectedConstructor.class));
}
diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java b/byte-buddy-dep/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java
index 545f9a56375..1388177b3c2 100644
--- a/byte-buddy-dep/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java
+++ b/byte-buddy-dep/src/test/java/net/bytebuddy/test/utility/JavaVersionRule.java
@@ -23,7 +23,7 @@ public class JavaVersionRule implements MethodRule {
public JavaVersionRule() {
currentVersion = ClassFileVersion.ofThisVm();
- openJ9 = System.getProperty("java.vm.vendor", "").toUpperCase(Locale.US).contains("J9");
+ openJ9 = System.getProperty("java.vm.name", "").toUpperCase(Locale.US).contains("J9");
}
public Statement apply(Statement base, FrameworkMethod method, Object target) {
@@ -40,9 +40,9 @@ public Statement apply(Statement base, FrameworkMethod method, Object target) {
if (openJ9 && !enforce.openJ9()) {
return new OpenJ9Statement();
} else if (enforce.value() != UNDEFINED && !version.isAtLeast(ClassFileVersion.ofJavaVersion(enforce.value()))) {
- return new NoOpStatement(enforce.value(), "at least");
+ return new NoOpStatement(enforce.value(), "at least", enforce.target());
} else if (enforce.atMost() != UNDEFINED && !version.isAtMost(ClassFileVersion.ofJavaVersion(enforce.atMost()))) {
- return new NoOpStatement(enforce.atMost(), "at most");
+ return new NoOpStatement(enforce.atMost(), "at most", enforce.target());
}
}
return base;
@@ -67,13 +67,18 @@ private static class NoOpStatement extends Statement {
private final String sort;
- private NoOpStatement(int requiredVersion, String sort) {
+ private final Class> target;
+
+ private NoOpStatement(int requiredVersion, String sort, Class> target) {
this.requiredVersion = requiredVersion;
this.sort = sort;
+ this.target = target;
}
public void evaluate() {
- Logger.getLogger("net.bytebuddy").warning("Ignoring test case: Requires a Java version of " + sort + " " + requiredVersion);
+ Logger.getLogger("net.bytebuddy").warning("Ignoring test case: Requires a Java version " +
+ "of " + sort + " " + requiredVersion
+ + (target == void.class ? "" : (" for target " + target)));
}
}
diff --git a/byte-buddy-gradle-plugin/build.gradle b/byte-buddy-gradle-plugin/build.gradle
index d175f8312a1..8c60233eb0b 100644
--- a/byte-buddy-gradle-plugin/build.gradle
+++ b/byte-buddy-gradle-plugin/build.gradle
@@ -1,6 +1,54 @@
plugins {
id 'java'
id 'java-gradle-plugin'
+ id 'com.gradle.plugin-publish' version '0.10.1'
}
-apply from: './main.gradle'
\ No newline at end of file
+apply from: './main.gradle'
+
+version = pom.parent.version.text().toString()
+
+if (gradle.gradleVersion.startsWith("2.")) { // support legacy version
+ dependencies {
+ compile gradleApi()
+ compile "net.bytebuddy:byte-buddy:${version}"
+ testCompile gradleTestKit()
+ testCompile group: 'junit', name: 'junit', version: outerPom.properties.'version.junit'
+ testCompile(group: 'org.mockito', name: 'mockito-core', version: outerPom.properties.'version.mockito') {
+ exclude group: 'net.bytebuddy'
+ }
+ }
+} else {
+ dependencies {
+ implementation gradleApi()
+ implementation "net.bytebuddy:byte-buddy:${version}"
+ testImplementation gradleTestKit()
+ testImplementation group: 'junit', name: 'junit', version: outerPom.properties.'version.junit'
+ testImplementation(group: 'org.mockito', name: 'mockito-core', version: outerPom.properties.'version.mockito') {
+ exclude group: 'net.bytebuddy'
+ }
+ }
+}
+
+configurations.all {
+ resolutionStrategy.dependencySubstitution {
+ substitute module("net.bytebuddy:byte-buddy:${version}") with project(":mavenBridge")
+ }
+}
+
+pluginBundle {
+ website = 'https://bytebuddy.net'
+ vcsUrl = 'https://github.com/raphw/byte-buddy'
+ tags = ['Byte Buddy', 'bytecode', 'enhancement']
+}
+
+gradlePlugin {
+ plugins {
+ byteBuddyPlugin {
+ id = pom.parent.groupId.text().toString() + '.' + pom.artifactId.text().toString()
+ displayName = pom.name.text().toString()
+ description = pom.description.text().toString()
+ implementationClass = 'net.bytebuddy.build.gradle.ByteBuddyPlugin'
+ }
+ }
+}
diff --git a/byte-buddy-gradle-plugin/build.simple.gradle b/byte-buddy-gradle-plugin/build.simple.gradle
new file mode 100644
index 00000000000..4acdf14dcf7
--- /dev/null
+++ b/byte-buddy-gradle-plugin/build.simple.gradle
@@ -0,0 +1,42 @@
+plugins {
+ id 'java'
+ id 'java-gradle-plugin'
+}
+
+apply from: './main.gradle'
+
+version = pom.parent.version.text().toString()
+
+// At this point, it is not given that any artifact from the Maven build can be found in a repository.
+def location = new File(project.buildscript.sourceFile.getParentFile(), "../byte-buddy/target/byte-buddy-${version}.jar").canonicalFile
+logger.info("Relying on ${location.absolutePath} as Byte Buddy dependency")
+
+if (gradle.gradleVersion.startsWith("2.")) { // support legacy version
+ dependencies {
+ compile gradleApi()
+ if (location.exists()) {
+ compile files(location.absolutePath)
+ } else {
+ logger.warn("${location.absolutePath} does not exist, can clean but not build project")
+ }
+ testCompile gradleTestKit()
+ testCompile group: 'junit', name: 'junit', version: outerPom.properties.'version.junit'
+ testCompile(group: 'org.mockito', name: 'mockito-core', version: outerPom.properties.'version.mockito') {
+ exclude group: 'net.bytebuddy'
+ }
+ }
+} else {
+ dependencies {
+ implementation gradleApi()
+ if (location.exists()) {
+ implementation files(location.absolutePath)
+ } else {
+ logger.warn("${location.absolutePath} does not exist, can clean but not build project")
+ }
+ testImplementation gradleTestKit()
+ testImplementation group: 'junit', name: 'junit', version: outerPom.properties.'version.junit'
+ testImplementation(group: 'org.mockito', name: 'mockito-core', version: outerPom.properties.'version.mockito') {
+ exclude group: 'net.bytebuddy'
+ }
+ }
+}
diff --git a/byte-buddy-gradle-plugin/gradle/5.4.1/gradle-5.4.1-bin.zip b/byte-buddy-gradle-plugin/gradle/6.0.1/gradle-6.0.1-bin.zip
similarity index 81%
rename from byte-buddy-gradle-plugin/gradle/5.4.1/gradle-5.4.1-bin.zip
rename to byte-buddy-gradle-plugin/gradle/6.0.1/gradle-6.0.1-bin.zip
index cd80b2a8686..9bf7b85f41c 100644
Binary files a/byte-buddy-gradle-plugin/gradle/5.4.1/gradle-5.4.1-bin.zip and b/byte-buddy-gradle-plugin/gradle/6.0.1/gradle-6.0.1-bin.zip differ
diff --git a/byte-buddy-gradle-plugin/gradle/5.4.1/gradle-wrapper.jar b/byte-buddy-gradle-plugin/gradle/6.0.1/gradle-wrapper.jar
similarity index 100%
rename from byte-buddy-gradle-plugin/gradle/5.4.1/gradle-wrapper.jar
rename to byte-buddy-gradle-plugin/gradle/6.0.1/gradle-wrapper.jar
diff --git a/byte-buddy-gradle-plugin/gradle/5.4.1/gradle-wrapper.properties b/byte-buddy-gradle-plugin/gradle/6.0.1/gradle-wrapper.properties
similarity index 76%
rename from byte-buddy-gradle-plugin/gradle/5.4.1/gradle-wrapper.properties
rename to byte-buddy-gradle-plugin/gradle/6.0.1/gradle-wrapper.properties
index a67928d5146..7404f540164 100644
--- a/byte-buddy-gradle-plugin/gradle/5.4.1/gradle-wrapper.properties
+++ b/byte-buddy-gradle-plugin/gradle/6.0.1/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=gradle-5.4.1-bin.zip
+distributionUrl=gradle-6.0.1-bin.zip
diff --git a/byte-buddy-gradle-plugin/gradlew b/byte-buddy-gradle-plugin/gradlew
index 502d4411cc3..f33bab60ef9 100755
--- a/byte-buddy-gradle-plugin/gradlew
+++ b/byte-buddy-gradle-plugin/gradlew
@@ -65,10 +65,10 @@ case "`uname`" in
esac
# Java 6 and 7 are no longer supported by Gradle 5 which is why we are using an old version of Gradle if those are detected.
-if `java -fullversion 2>&1 >/dev/null | awk '{print $4}' | grep -Eq "^\"1\.[67]\."`; then
+if `$JAVA_HOME/bin/java -fullversion 2>&1 >/dev/null | awk '{print $4}' | grep -Eq "^\"1\.[67]\."`; then
GRADLE_VERSION="2.14.1"
else
- GRADLE_VERSION="5.4.1"
+ GRADLE_VERSION="6.0.1"
fi
CLASSPATH=$APP_HOME/gradle/${GRADLE_VERSION}/gradle-wrapper.jar
diff --git a/byte-buddy-gradle-plugin/gradlew.bat b/byte-buddy-gradle-plugin/gradlew.bat
index 72d960814be..71e7370d4ec 100644
--- a/byte-buddy-gradle-plugin/gradlew.bat
+++ b/byte-buddy-gradle-plugin/gradlew.bat
@@ -64,13 +64,13 @@ set CMD_LINE_ARGS=%*
@rem Setup the command line
@rem Java 6 and 7 are no longer supported by Gradle 5 which is why we are using an old version of Gradle if those are detected.
-for /f tokens^=2-5^ delims^=.-_^" %%j in ('java -fullversion 2^>^&1') do set "JAVA_VERSION_STRING=%%j%%k%%l%%m"
+for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA_HOME%\bin\java -fullversion 2^>^&1') do set "JAVA_VERSION_STRING=%%j%%k%%l%%m"
IF "%JAVA_VERSION_STRING:~0,3%"=="160" (
set "GRADLE_VERSION=2.14.1"
) ELSE (IF "%JAVA_VERSION_STRING:~0,3%"=="170" (
set "GRADLE_VERSION=2.14.1"
) ELSE (
- set "GRADLE_VERSION=5.4.1"
+ set "GRADLE_VERSION=6.0.1"
))
set CLASSPATH=%APP_HOME%\gradle\%GRADLE_VERSION%\gradle-wrapper.jar
diff --git a/byte-buddy-gradle-plugin/main.gradle b/byte-buddy-gradle-plugin/main.gradle
index 19aa95f929a..2ad1b887767 100644
--- a/byte-buddy-gradle-plugin/main.gradle
+++ b/byte-buddy-gradle-plugin/main.gradle
@@ -1,5 +1,5 @@
-def pom = new XmlSlurper().parse(file('./pom.xml'))
-def outerPom = new XmlSlurper().parse(file('../pom.xml'))
+ext.pom = new XmlSlurper().parse(file('./pom.xml'))
+ext.outerPom = new XmlSlurper().parse(file('../pom.xml'))
group = pom.parent.groupId.text().toString()
version = pom.parent.version.text().toString()
@@ -7,7 +7,7 @@ description = pom.description.text().toString()
// Gradle cannot process all version strings such that JavaVersion.current() fails.
def raw = System.getProperty("java.version")
-def current;
+def current
if (!raw.startsWith("1.") && raw.contains(".")) {
current = JavaVersion.toVersion(raw.substring(0, raw.indexOf('.')))
} else {
@@ -42,23 +42,6 @@ repositories {
mavenCentral()
}
-dependencies {
- compile gradleApi()
- // At this point, it is not given that any artifact from the Maven build can be found in a repository.
- def location = new File(project.buildscript.sourceFile.getParentFile(), "../byte-buddy/target/byte-buddy-${version}.jar").canonicalFile
- logger.info("Relying on ${location.absolutePath} as Byte Buddy dependency")
- if (location.exists()) {
- compile files(location.absolutePath)
- } else {
- logger.warn("${location.absolutePath} does not exist, can clean but not build project")
- }
- testCompile gradleTestKit()
- testCompile group: 'junit', name: 'junit', version: outerPom.properties.'version.junit'
- testCompile(group: 'org.mockito', name: 'mockito-core', version: outerPom.properties.'version.mockito') {
- exclude group: 'net.bytebuddy'
- }
-}
-
// Without the extras property, creating a javadoc artifact is not necessary.
if (Boolean.getBoolean('net.bytebuddy.misc.extras')) {
task javadocJar(type: Jar, dependsOn: javadoc) {
@@ -80,7 +63,7 @@ task copyLicense(type: Copy) {
from '..'
include 'LICENSE', 'NOTICE'
into "$buildDir/resources/main/META-INF"
- def pattern = java.util.regex.Pattern.compile('\\$\\{([a-zA-Z0-9\\-._]+)}');
+ def pattern = java.util.regex.Pattern.compile('\\$\\{([a-zA-Z0-9\\-._]+)}')
filter { String line ->
def matcher = pattern.matcher(line)
def buffer = new StringBuffer()
diff --git a/byte-buddy-gradle-plugin/mavenBridge/build.gradle b/byte-buddy-gradle-plugin/mavenBridge/build.gradle
new file mode 100644
index 00000000000..4b5aeb58575
--- /dev/null
+++ b/byte-buddy-gradle-plugin/mavenBridge/build.gradle
@@ -0,0 +1,18 @@
+version = pom.parent.version.toString()
+
+configurations {
+ mavenBridge {
+ canBeResolved = false
+ canBeConsumed = true
+ attributes {
+ attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, 'java-runtime'))
+ }
+ outgoing.artifact(objects.fileProperty().fileProvider(providers.provider {
+ def file = rootProject.file("../byte-buddy/target/byte-buddy-${version}.jar")
+ if (!file.exists()) {
+ throw new GradleException("Cannot resolve ${version} of byte-buddy artifact what is required for a substitution")
+ }
+ file
+ }))
+ }
+}
diff --git a/byte-buddy-gradle-plugin/pom.xml b/byte-buddy-gradle-plugin/pom.xml
index 1e912c39a10..3d402ddef44 100644
--- a/byte-buddy-gradle-plugin/pom.xml
+++ b/byte-buddy-gradle-plugin/pom.xml
@@ -28,10 +28,8 @@
1.8
- 1.0.10
- 0.2
- 4.5
- gradlew
+ gradlew
+ false
@@ -71,6 +69,9 @@
org.codehaus.mojo
exec-maven-plugin
${version.plugin.exec}
+
+ ${gradle.disabled}
+
gradle-clean
@@ -79,9 +80,10 @@
exec
- ${project.basedir}/${exec.gradle}
+ ${project.basedir}/${gradle.exec}
clean
+ --build-file=build.simple.gradle
--info
@@ -93,10 +95,11 @@
exec
- ${project.basedir}/${exec.gradle}
+ ${project.basedir}/${gradle.exec}
build
javadocJar
+ --build-file=build.simple.gradle
--info
-Dnet.bytebuddy.test.integration=${bytebuddy.integration}
-Dnet.bytebuddy.misc.extras=${bytebuddy.extras}
@@ -112,10 +115,10 @@
exec
- ${project.basedir}/${exec.gradle}
+ ${project.basedir}/${gradle.exec}
publishPlugins
- --build-file=release.gradle
+ --build-file=build.gradle
--info
-Dnet.bytebuddy.test.integration=${bytebuddy.integration}
-Dnet.bytebuddy.misc.extras=${bytebuddy.extras}
@@ -139,6 +142,7 @@
run
+ ${gradle.disabled}
@@ -150,29 +154,53 @@
+
- gradle-legacy
+ gradle-windows
false
- 1.6
+
+ Windows
+
- 1.0.9
- 2.14.1
+ gradlew.bat
-
+
+
- gradle-windows
+ gradle-disabled
false
-
- Windows
-
+ [14,)
- gradlew.bat
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ ${version.plugin.antrun}
+
+
+ log-skip
+ compile
+
+ run
+
+
+
+
+
+
+
+
+
+
+
@@ -192,6 +220,7 @@
run
+ ${gradle.disabled}
diff --git a/byte-buddy-gradle-plugin/release.gradle b/byte-buddy-gradle-plugin/release.gradle
deleted file mode 100644
index 0085a1ed129..00000000000
--- a/byte-buddy-gradle-plugin/release.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-plugins {
- id 'java'
- id 'java-gradle-plugin'
- id 'com.gradle.plugin-publish' version '0.10.0'
-}
-
-apply from: './main.gradle'
-
-def pom = new XmlSlurper().parse(file('./pom.xml'))
-
-pluginBundle {
- website = 'https://bytebuddy.net'
- vcsUrl = 'https://github.com/raphw/byte-buddy'
- tags = ['Byte Buddy', 'bytecode', 'enhancement']
-}
-
-gradlePlugin {
- plugins {
- byteBuddyPlugin {
- id = pom.parent.groupId.text().toString() + '.' + pom.artifactId.text().toString()
- displayName = 'Byte Buddy Gradle plugin'
- description = pom.description.text().toString()
- implementationClass = 'net.bytebuddy.build.gradle.ByteBuddyPlugin'
- }
- }
-}
diff --git a/byte-buddy-gradle-plugin/settings.gradle b/byte-buddy-gradle-plugin/settings.gradle
new file mode 100644
index 00000000000..05c268b2ae0
--- /dev/null
+++ b/byte-buddy-gradle-plugin/settings.gradle
@@ -0,0 +1 @@
+include "mavenBridge"
diff --git a/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/ByteBuddyExtensionTest.java b/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/ByteBuddyExtensionTest.java
index 14ce58f3e2a..991ef223c0f 100644
--- a/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/ByteBuddyExtensionTest.java
+++ b/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/ByteBuddyExtensionTest.java
@@ -19,10 +19,8 @@
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.endsWith;
-import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.any;
import static org.mockito.Mockito.*;
public class ByteBuddyExtensionTest {
diff --git a/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/PostCompilationActionTest.java b/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/PostCompilationActionTest.java
index d5582f13421..e2d6e516798 100644
--- a/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/PostCompilationActionTest.java
+++ b/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/PostCompilationActionTest.java
@@ -11,7 +11,6 @@
import org.junit.rules.TestRule;
import org.mockito.Mock;
-import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
public class PostCompilationActionTest {
diff --git a/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/TransformationActionTest.java b/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/TransformationActionTest.java
index 19b4b85fc9c..c087cdf6e04 100644
--- a/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/TransformationActionTest.java
+++ b/byte-buddy-gradle-plugin/src/test/java/net/bytebuddy/build/gradle/TransformationActionTest.java
@@ -35,7 +35,7 @@
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;