All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.autonomousapps.kit.gradle.Toolchain.kt Maven / Gradle / Ivy

The newest version!
package com.autonomousapps.kit.gradle

import com.autonomousapps.kit.render.Element
import com.autonomousapps.kit.render.Scribe

public class Toolchain(
  public val javaLanguageVersion: Int,
) : Element.Block {

  override val name: String = "toolchain"

  /**
   * Example:
   * ```
   * java {
   *   toolchain {
   *     languageVersion.set(JavaLanguageVersion.of(17))
   *   }
   * }
   * ```
   */
  override fun render(scribe: Scribe): String = scribe.block(this) { s ->
    s.line {
      it.append("languageVersion.set(JavaLanguageVersion.of($javaLanguageVersion))")
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy