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

generate command failing building Kotlin #59

Open
PeterJCLaw opened this issue Oct 21, 2024 · 0 comments
Open

generate command failing building Kotlin #59

PeterJCLaw opened this issue Oct 21, 2024 · 0 comments

Comments

@PeterJCLaw
Copy link

I'm trying out smarttype using the examples/webExample folder in this repo and I'm hitting a compiler error when running the generate command.

Output:

$ java -jar ../../../smartype-generator-1.7.0.jar generate
Extracting mParticle Data Plan
Found 16 mParticle data points.
Creating API with 16 message schema(s).
Unable to find name for schema: {"properties":{"data":{"additionalProperties":true,"properties":{},"required":[],"type":"object"},"event_type":{"const":"product_action"}}}
Unable to find name for schema: {"properties":{"data":{"additionalProperties":true,"properties":{},"required":[],"type":"object"},"event_type":{"const":"product_action"}}}
Found name: Email Sends
Found name: Email Opens
Found name: Email Deliveries
Found name: Email Bounces
Found name: Place Order
Found name: Menu
Found name: Home
Found name: Checkout
Unable to find name for schema: {"additionalProperties":false,"properties":{"$FirstName":{"description":"","type":"string"},"$Age":{"description":"","type":"number"},"$LastName":{"description":"","type":"string"},"payment":{"description":"","type":"string"},"favorite_store":{"description":"","type":"string"},"favorite_sku":{"description":"","type":"string"},"$Zip":{"description":"","type":"number"},"event_type":{"const":"user_attributes"}},"required":[]}
Unable to find name for schema: {"additionalProperties":false,"properties":{"email":{"description":"","type":"string"},"customerid":{"description":"","type":"string"},"ios_idfa":{"description":"","type":"string"},"android_aaid":{"description":"","type":"string"},"other":{"description":"","type":"string"},"ios_idfv":{"description":"","type":"string"},"device_application_stamp":{"description":"","type":"string"},"event_type":{"const":"user_identities"}},"required":[],"type":"object"}
Found name: Attribution
Found name: Choose Item
Found name: Set Pickup
Found name: Search Item

> Configure project :buildSrc
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.9.20` that might work differently than in the requested version `1.9.22`.

> Task :buildSrc:compileKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:compileKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlin' (21).
  
  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 409ms
2 actionable tasks: 2 executed

I'm on Ubuntu 22.04 with openjdk-11-jre (via default-jre) and openjdk-21-jre installed.
Java version:

$ java --version
openjdk 21.0.4 2024-07-16
OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu222.04)
OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu222.04, mixed mode, sharing)

I've tried clearing the .smarttype directory, however that doesn't change the result.

Any suggestions for how to get this working would be appreciated.

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

1 participant