Skip to content

Commit

Permalink
Use Gradle 8 compatible API
Browse files Browse the repository at this point in the history
In Web3JGradle plugin replace an API that was removed in Gradle 8 with a
Gradle 8 API and an appropriate fallback.
  • Loading branch information
shemnon committed Apr 8, 2024
1 parent 5ee1640 commit ee41003
Showing 1 changed file with 6 additions and 1 deletion.
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();
}
}
}

0 comments on commit ee41003

Please sign in to comment.