/kotlin-metadata__kotlin-compiler-lite

Subset of the Kotlin compiler to be used by kotlin-metadata.

Primary LanguageKotlinMIT LicenseMIT

kotlin-compiler-lite

bintray maven-central

Wraps JetBrains/kotlin to produce a subset of the Kotlin compiler to be used by kotlin-metadata.

It's a standalone project because versioning is parallel (follows the compiler) and building it is quite heavy, especially for the CI.

Features

  • all Kotlin/Java sources, even for external dependencies
  • every package relocated under me.eugeniomarletti.kotlin.metadata.shadow.* in both compiled classes and sources
  • "full" version of all Protocol Buffers, instead of the "lite" one used by default (see Options > optimize_for > LITE_RUNTIME) (temporarily disabled until fixed)
  • .proto files package/import directives fixed to reflect their relative locations (allows inspection through the IDE)

Download

This should not be used directly, see kotlin-metadata instead!

compile "me.eugeniomarletti.kotlin.metadata:kotlin-compiler-lite:$version"

Random notes

  • since having different versions of the gradle wrapper often makes the CI run out of memory and fail, gradlew is a symlink to the one in the wrapped repository
  • doesn't modify any files on the original build, instead relies on runtime injection of modules through an initialization script
  • overrides are performed in kotlin.init.gradle and __injected/override/build.gradle.kts
  • the top level build handles:
    • downloading external dependencies
    • starting inner build with init script
    • uploading generated artifacts