Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Gradle 8 compatible API #83

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ apply {
}

repositories {
mavenLocal()
maven {
url 'https://plugins.gradle.org/m2/'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ group=org.web3j
version=4.11.2
org.gradle.caching=true
org.gradle.parallel=true
solidityPluginVersion=0.4.0
solidityPluginVersion=0.4.1-SNAPSHOT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this change because we don't provide SNAPSHOT versions for gradle plugins
Solidity plugin version will be updated here before releasing new gradle plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

kotlinVersion=1.8.10
junitVersion=4.12
7 changes: 6 additions & 1 deletion src/main/java/org/web3j/gradle/plugin/Web3jPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ protected File buildOutputDir(final SourceSet sourceSet) {
final SoliditySourceSet soliditySourceSet =
(SoliditySourceSet) convention.getPlugins().get(SoliditySourceSet.NAME);

return soliditySourceSet.getSolidity().getOutputDir();
try {
return soliditySourceSet.getSolidity().getDestinationDirectory().getAsFile().get();
} catch (NoSuchMethodError ignored) {
//TODO delete this catch block and unwrap the try block after Gradle 8 migration
return soliditySourceSet.getSolidity().getOutputDir();
}
}
}
Loading