Skip to content

Kotlin/Bazel: provide wrapper for managing versions of kotlinc#16208

Merged
redsun82 merged 3 commits intoredsun82/kotlinfrom
redsun82/kotlin-wrapper
Apr 15, 2024
Merged

Kotlin/Bazel: provide wrapper for managing versions of kotlinc#16208
redsun82 merged 3 commits intoredsun82/kotlinfrom
redsun82/kotlin-wrapper

Conversation

@redsun82
Copy link
Copy Markdown
Contributor

@redsun82 redsun82 commented Apr 15, 2024

By adding java/kotlinc-extractor/deps/dev to PATH, one gets a kotlinc wrapper that takes care of downloading and extracting the desired version of kotlinc on demand. The desired version can be selected with kotlinc --select x.y.z, or left to the current default of 1.9.0.

Moreover, this requested version is integrated with the Bazel build, so that when using this wrapper, changes in the selected version will be picked up to define the default single version kotlin extractor build, without needing to do anything else (like bazel fetch --force or similar).

Selected and installed version data is stored in .gitignored files in the same directory, and can be cleared with kotlinc --clear.

By adding `java/kotlinc-extractor/deps/dev` to `PATH`, one gets a
`kotlinc` wrapper that takes care of downloading and extracting the
desired version of `kotlinc` on demand. The desired version can be
selected with `kotlinc --select x.y.z`, or left to the current default
of `1.9.0`.

Moreover, this default version is integrated with the Bazel build, so
that when using this wrapper, changes in the selected version will be
picked up to define the default single version kotlin extractor build,
without needing to do anything else (like `bazel fetch --force` or
similar).

Selected and installed version data is stored in `.gitignore`d files
in the same directory, and can be cleared with `kotlinc --clear`.
@redsun82 redsun82 requested a review from igfoo April 15, 2024 08:55
@redsun82 redsun82 requested review from a team as code owners April 15, 2024 08:55
@redsun82 redsun82 merged commit 6a83bf9 into redsun82/kotlin Apr 15, 2024
@redsun82 redsun82 deleted the redsun82/kotlin-wrapper branch April 15, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant