Could not set unknown property 'outputDir' for Main Solidity Sources of type org.gradle.api.internal.file.DefaultSourceDirectorySet.
Opened this issue · 5 comments
I'm getting
> Failed to apply plugin class 'org.web3j.solidity.gradle.plugin.SolidityPlugin'.
> Could not set unknown property 'outputDir' for Main Solidity Sources of type org.gradle.api.internal.file.DefaultSourceDirectorySet.
The code:
buildscript {
repositories {
maven("https://artifacts.consensys.net/public/maven/maven/")
}
}
plugins {
kotlin("jvm") version "1.9.23"
id("org.web3j") version "4.11.2"
}
Tested Gradle versions: 8.4, 8.7
Workaround competitive plugin id("io.github.ehdrbs0318.lazy3j") version "1.0.4"
seems to work
Same here:
An exception occurred applying plugin request [id: 'org.web3j', version: '4.11.3']
> Failed to apply plugin class 'org.web3j.solidity.gradle.plugin.SolidityPlugin'.
> Could not set unknown property 'outputDir' for Main Solidity Sources of type org.gradle.api.internal.file.DefaultSourceDirectorySet.
gradle 8.7
, java 17
Looks to be an issue when using a gradle version >= 8.0
Quote from https://docs.gradle.org/7.6/javadoc/org/gradle/api/file/SourceDirectorySet.html#setOutputDir:
setOutputDir
@deprecated
void setOutputDir(Provider<java.io.File> provider)
Deprecated.
Use getDestinationDirectory().set() instead. This method will be removed in Gradle 8.0.
Sets the provider that gives the directory to assemble the compiled classes into.
Parameters:
provider - provides output directory for this source directory set
Since:
4.0
Same here:
An exception occurred applying plugin request [id: 'org.web3j', version: '4.11.3'] > Failed to apply plugin class 'org.web3j.solidity.gradle.plugin.SolidityPlugin'. > Could not set unknown property 'outputDir' for Main Solidity Sources of type org.gradle.api.internal.file.DefaultSourceDirectorySet.
gradle
8.7
, java17
Yes it is due to incompatibility with gradle version >=8.5.
We are working on updating all web3j repos to gradle 8.5
Reopen this as the issue persists