Skip to content

Commit

Permalink
Update Gradle version.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Nov 20, 2023
1 parent f7bcc5c commit ab6ebea
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
11 changes: 4 additions & 7 deletions byte-buddy-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '1.0.0'
id 'com.gradle.plugin-publish' version '1.2.1'
}

if (gradle.gradleVersion.startsWith("2.")) {
Expand Down Expand Up @@ -60,19 +60,16 @@ tasks.named("jar") {
}
}

pluginBundle {
website = 'https://bytebuddy.net'
vcsUrl = 'https://github.com/raphw/byte-buddy'
tags = ['Byte Buddy', 'bytecode', 'enhancement']
}

gradlePlugin {
website.set("https://bytebuddy.net")
vcsUrl.set("https://github.com/raphw/byte-buddy")
plugins {
byteBuddyPlugin {
id = 'net.bytebuddy.byte-buddy-gradle-plugin'
implementationClass = 'net.bytebuddy.build.gradle.ByteBuddyPlugin'
displayName = 'Byte Buddy Gradle plugin'
description = 'The Byte Buddy plugin allows for post processing Java classes with byte code transformation.'
tags.set(['Byte Buddy', 'bytecode', 'enhancement'])
}
}
}
18 changes: 9 additions & 9 deletions byte-buddy-gradle-plugin/gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.1.xsd">
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.2.xsd">
<configuration>
<verify-metadata>true</verify-metadata>
<verify-signatures>false</verify-signatures>
Expand Down Expand Up @@ -1846,17 +1846,17 @@
<sha256 value="7846399b35c7cd642a9b3a000c3e2d62d04eb37a4547b6933cc8b18bcc2f086b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.gradle.plugin-publish" name="com.gradle.plugin-publish.gradle.plugin" version="1.0.0">
<artifact name="com.gradle.plugin-publish.gradle.plugin-1.0.0.pom">
<sha256 value="8e5a9777545442f2c5cf29c0abb264269bc8950d96546d0963e51c34ae95e28a" origin="Generated by Gradle"/>
<component group="com.gradle.plugin-publish" name="com.gradle.plugin-publish.gradle.plugin" version="1.2.1">
<artifact name="com.gradle.plugin-publish.gradle.plugin-1.2.1.pom">
<sha256 value="eb4941440f131996e64fa4820dcdbae23b3de548418ba91ef4c634a6a71f54cb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.gradle.publish" name="plugin-publish-plugin" version="1.0.0">
<artifact name="plugin-publish-plugin-1.0.0.jar">
<sha256 value="34b81aba1dc0b18f9a35b0a28e800b460b6df105dcb92893c3a0e78276bd756c" origin="Generated by Gradle"/>
<component group="com.gradle.publish" name="plugin-publish-plugin" version="1.2.1">
<artifact name="plugin-publish-plugin-1.2.1.jar">
<sha256 value="298f0c2e979532171a05a41603263733b65f89113d4e809ccd0e26990149de18" origin="Generated by Gradle"/>
</artifact>
<artifact name="plugin-publish-plugin-1.0.0.module">
<sha256 value="c4146775303234775df340840233ee4cec2018f15bc6672997bb734e79971d7d" origin="Generated by Gradle"/>
<artifact name="plugin-publish-plugin-1.2.1.module">
<sha256 value="c3df2eb9a83565d3b63150d86b4df8e28f661b55cecdd44927e469331036cb19" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup" name="javapoet" version="1.10.0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# under the License.
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=cb87f222c5585bd46838ad4db78463a5c5f3d336e5e2b98dc7c0c586527351c2
wrapperUrl=https://raw.githubusercontent.com/gradle/gradle/v7.5.0/gradle/wrapper/gradle-wrapper.jar
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
wrapperUrl=https://raw.githubusercontent.com/gradle/gradle/v8.4.0/gradle/wrapper/gradle-wrapper.jar
wrapperHash=91a239400bb638f36a1795d8fdf7939d532cdc7d794d1119b7261aac158b1e60
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.plugins.Convention;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.SourceSetContainer;
Expand Down Expand Up @@ -292,20 +291,28 @@ protected static class JavaConventionConfiguration {
@MaybeNull
private static final Method GET_TARGET_COMPATIBILITY_EXTENSION;

/**
* The {@code org.gradle.api.plugins.Convention#findPlugin(Class)} method or {@code null} if not available.
*/
@MaybeNull
private static final Method FIND_PLUGIN;

/*
* Resolves the convention methods which might no longer be supported.
*/
static {
Class<?> javaPluginConvention, javaPluginExtension;
Method getConvention, getExtensions, findByType, getSourceSetsConvention, getSourceSetsExtension, getTargetCompatibilityConvention, getTargetCompatibilityExtension;
Method getConvention, getExtensions, findPlugin, findByType, getSourceSetsConvention, getSourceSetsExtension, getTargetCompatibilityConvention, getTargetCompatibilityExtension;
try {
javaPluginConvention = Class.forName("org.gradle.api.plugins.JavaPluginConvention");
getConvention = Project.class.getMethod("getConvention");
findPlugin = Class.forName("org.gradle.api.plugins.Convention").getMethod("findClass", Class.class);
getSourceSetsConvention = javaPluginConvention.getMethod("getSourceSets");
getTargetCompatibilityConvention = javaPluginConvention.getMethod("getTargetCompatibility");
} catch (Throwable ignored) {
javaPluginConvention = null;
getConvention = null;
findPlugin = null;
getSourceSetsConvention = null;
getTargetCompatibilityConvention = null;
}
Expand All @@ -326,6 +333,7 @@ protected static class JavaConventionConfiguration {
JAVA_PLUGIN_EXTENSION = javaPluginExtension;
GET_CONVENTION = getConvention;
GET_EXTENSIONS = getExtensions;
FIND_PLUGIN = findPlugin;
FIND_BY_TYPE = findByType;
GET_SOURCE_SETS_CONVENTION = getSourceSetsConvention;
GET_SOURCE_SETS_EXTENSION = getSourceSetsExtension;
Expand Down Expand Up @@ -380,10 +388,11 @@ protected static ByteBuddyPlugin.JavaConventionConfiguration of(Project project)
}
if (JAVA_PLUGIN_CONVENTION != null
&& GET_CONVENTION != null
&& FIND_PLUGIN != null
&& GET_SOURCE_SETS_CONVENTION != null
&& GET_TARGET_COMPATIBILITY_CONVENTION != null) {
try {
Object convention = ((Convention) GET_CONVENTION.invoke(project)).findPlugin(JAVA_PLUGIN_CONVENTION);
Object convention = FIND_PLUGIN.invoke(GET_CONVENTION.invoke(project), JAVA_PLUGIN_CONVENTION);
if (convention != null) {
return new JavaConventionConfiguration(
(SourceSetContainer) GET_SOURCE_SETS_CONVENTION.invoke(convention),
Expand Down

0 comments on commit ab6ebea

Please sign in to comment.