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

Can't set JVM-target in okbuck which need to run on jvm 1.8. #928

Open
FightJames opened this issue Nov 4, 2020 · 1 comment
Open

Can't set JVM-target in okbuck which need to run on jvm 1.8. #928

FightJames opened this issue Nov 4, 2020 · 1 comment

Comments

@FightJames
Copy link

FightJames commented Nov 4, 2020

At buck documentation. Need to set jvm-target at BUCK file. But can't modify BUCK file when using okbuck.
okbuck version : 0.51.2
https://buck.build/rule/kotlin_library.html
image

Here is error message.

error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option

BUCK file generated by okbuck.

okbuck_kotlin_android_module(
    name = "src_debug",
    srcs = glob([
        "src/main/java/**/*.java",
        "src/main/java/**/*.kt",
    ]),
    source = "8",
    target = "8",
    provided_deps = [
        "//.okbuck/workspace/d8:rt-stub.jar",
    ],
    extra_kotlinc_arguments = [
        "-P",
        ".......",
        "-jvm-target",
        "1.6",
        "-no-reflect",
        "-no-stdlib",
    ],
    kotlinc_plugins = [
        "//.okbuck/workspace/kotlin_home:android-extensions-compiler.jar",
    ],
....

I had tried extraBuckOpts and dived to okbuck source code. There is no kotlin_library rule for it.

@FightJames FightJames changed the title Can't set JVM-target in okbuck which need to compile on jvm 1.8. Can't set JVM-target in okbuck which need to run on jvm 1.8. Nov 4, 2020
@ronnie-o-sullivan
Copy link

I have the same problem。

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