question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load class 'org.gradle.kotlin.dsl.precompile.v1.PrecompiledProjectScript'.

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
macisamuelecommented, Feb 14, 2020

It compiles. but I do not see any generated code

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.

> Task :app:generateSwagger FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:generateSwagger' (type 'GenerateTask').
> File '/home/maci/pg/TestYelpCodegen/app/sample_specs.json' specified for property 'inputFile' does not exist.

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.

0reactions
mariuspenacommented, Feb 14, 2020

About building TestYelpCodegen with gradle 6.1, I did already tried and it works

so I changed the gradle wrapper here distributionUrl=https://services.gradle.org/distributions/gradle-6.1-all.zip to 6.1

It compiles. but I do not see any generated code

Read more comments on GitHub >

github_iconTop Results From Across the Web

org.gradle.kotlin.kotlin-dsl.precompiled-script-plugins
Using the plugins DSL: plugins { id "org.gradle.kotlin.kotlin-dsl.precompiled-script-plugins" version "4.0.0-alpha02" } ...
Read more >
Cannot access script base class 'org.gradle.kotlin.dsl ...
Click "Load Script Configurations" when it appears after re-indexing. ... Open Android Studio and configure JDK in Gradle Settings (Project ...
Read more >
org/jetbrains/kotlin/cli/common/PropertiesKt
When I recently used Idea to create a project based on toklin+gradle+springboot, I always prompt when I execute Sync for the first time: ......
Read more >
buildSrc:generatePrecompiledScriptPluginAccessors ...
Upgraded to AGP 7.2.0-rc01 from AGP 7.1.3 , and encountered the following exception during a gradle sync:
Read more >
Gradle build for Kotlin project fails with "Unable to load class ...
I've attached the idea.log as mentioned in the error. There is a stacktrace as well: org/jetbrains/kotlin/samWithReceiver/gradle/SamWithReceiverGradleSubplugin ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found