Skip to content

Commit c98501d

Browse files
authored
Merge pull request #83 from shemnon/gradle8-support
Use Gradle 8 compatible API
2 parents 5ee1640 + 8e6726a commit c98501d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/web3j/gradle/plugin/Web3jPlugin.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ protected File buildOutputDir(final SourceSet sourceSet) {
184184
final SoliditySourceSet soliditySourceSet =
185185
(SoliditySourceSet) convention.getPlugins().get(SoliditySourceSet.NAME);
186186

187-
return soliditySourceSet.getSolidity().getOutputDir();
187+
try {
188+
return soliditySourceSet.getSolidity().getDestinationDirectory().getAsFile().get();
189+
} catch (NoSuchMethodError ignored) {
190+
// TODO delete this catch block and unwrap the try block after Gradle 8 migration
191+
return soliditySourceSet.getSolidity().getOutputDir();
192+
}
188193
}
189194
}

0 commit comments

Comments
 (0)