Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse vendor when using "matching" #141

Open
sproctor opened this issue Dec 4, 2024 · 3 comments
Open

Fails to parse vendor when using "matching" #141

sproctor opened this issue Dec 4, 2024 · 3 comments

Comments

@sproctor
Copy link

sproctor commented Dec 4, 2024

Describe the bug
I'm specifying the vendor in gradle.properties. Then reading that value in my gradle build files.

val jvmToolchainVersion: String by project
val jvmToolchainVendor: String by project
kotlin {
    jvmToolchain(jvmToolchainVersion.toInt())
    jvmToolchain {
        languageVersion = JavaLanguageVersion.of(jvmToolchainVersion.toInt())
        vendor = JvmVendorSpec.matching(jvmToolchainVendor)
    }
}

This fails with the following message:

🔔 Unrecognized JVM vendor vendor matching('jetbrains') in Gradle build. No JDK has been imported, please do it manually.
❌ Task failed: Linux App for Intel: JAR files were imported but no JVM inputs were supplied for 'linux.amd64.glibc'.

It's simple enough to workaround this by specifying the JVM in the conveyor config.

@mikehearn
Copy link
Member

What version of the Gradle plugin are you using? Is it 1.12?

@sproctor
Copy link
Author

sproctor commented Dec 7, 2024

Yes, 1.12

@mikehearn
Copy link
Member

OK, this is indeed a bug in the Gradle plugin. We're expecting a literal specification of the vendor, but what you're providing is a filter. I guess we'd need to apply the filter to each known vendor in turn and select the first that matches. It should be easy to work around on your side for now with a bit of extra code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants