swagger-gradle-codegen: Unable to load class 'org.gradle.kotlin.dsl.precompile.v1.PrecompiledProjectScript'.
Hi. made a new project, gradle version 3.5.3 (<<< EDIT: actually it is 5.4.1) added in the the module gradle file:
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.yelp.codegen:plugin:1.3.0"
}
}
apply plugin: "com.yelp.codegen.plugin"
generateSwagger {
platform = "kotlin"
packageName = "com.yelp.codegen.samples"
inputFile = file("./sample_specs.json")
outputDir = file("./src/main/java/")
}
but I get this error: Unable to load class ‘org.gradle.kotlin.dsl.precompile.v1.PrecompiledProjectScript’.
can somebdoy help me ? thx!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (2 by maintainers)
To generate code you need to run
/gradlew generateSwagger. Be aware the test project does actually not build because swagger spec file isn’t present.PR #111 fixed the issue and in the next days we’ll provide a new plugin release that restores Gradle 5+ compatibility.
I’m closing this for know as the issue has been addressed and a temporary workaround has been identified.