Skip to content

Commit

Permalink
chore: seal state (temp)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgammon committed Jul 15, 2023
1 parent 178f60b commit 4f890fe
Show file tree
Hide file tree
Showing 16 changed files with 157 additions and 30 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ apiValidation {
)

ignoredProjects += listOf(
"bundler",
//"bundler",
"bom",
"cli",
//"cli",
"proto",
"processor",
"reports",
Expand Down
25 changes: 25 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ plugins {
}

val buildDocs by properties
val javaLanguageVersion = project.properties["versions.java.language"] as String
val javaLanguageTarget = project.properties["versions.java.target"] as String

dependencies {
implementation(gradleApi())
Expand All @@ -37,4 +39,27 @@ dependencies {
api("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}

java {
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
targetCompatibility = JavaVersion.toVersion(javaLanguageTarget)
}

afterEvaluate {
tasks {
compileKotlin.configure {
kotlinOptions {
jvmTarget = javaLanguageTarget
javaParameters = true
}
}

compileTestKotlin.configure {
kotlinOptions {
jvmTarget = javaLanguageTarget
javaParameters = true
}
}
}
}

apply(from = "../gradle/loadProps.gradle.kts")
2 changes: 2 additions & 0 deletions buildSrc/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
versions.java.language = 11
versions.java.target = 11
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
buildSamples = false
buildExamples = false
buildPlugins = true
buildDocs = true
buildDocs = false
buildDocsSite = true
buildBenchmarks = false
enableSigning = false
Expand Down Expand Up @@ -44,7 +44,7 @@ versions.kotlin.language = 1.8
versions.android.sdk.target = 33

# Settings: Libraries
micronautVersion = 3.8.8
micronautVersion = 3.9.4

# Settings: Kotlin
kotlin.code.style = official
Expand Down
8 changes: 4 additions & 4 deletions gradle/elide.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jline = "3.21.0"
netty = "4.1.86.Final"
netty_tcnative = "2.0.56.Final"
dekorate = "3.1.1"
micronaut_lib = "3.8.8"
micronaut_lib = "3.9.4"
micronaut_aot = "1.1.1"
micronaut_aws = "3.9.3"
micronaut_data = "3.8.1"
Expand All @@ -52,11 +52,11 @@ micronaut_rss = "3.2.0"
micronaut_kafka = "4.4.0"
micronaut_beanvalidation = "3.2.0"
micronaut_kotlin = "3.2.2"
kotlinx_coroutines = "1.7.0-Beta"
kotlinx_coroutines = "1.7.2"
kotlinx_collections = "0.3.5"
kotlinx_datetime = "0.4.0"
kotlinx_html = "0.8.0"
kotlinx_serialization = "1.5.0"
kotlinx_serialization = "1.5.1"
kotlinx_metadata_jvm = "0.5.0"
atomicfu = "0.18.5"
kotlinx_benchmark = "0.4.7"
Expand Down Expand Up @@ -85,7 +85,7 @@ jakarta_annotation_api = "2.1.1"
javax_persistence = "2.2"
javax_annotations = "1.3.2"
jsoup = "1.15.3"
junit_jupiter = "5.9.2"
junit_jupiter = "5.10.0-M1"
logback = "1.2.11"
docker_plugin = "9.1.0"
node_plugin = "3.5.0"
Expand Down
22 changes: 19 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ include(
":packages:base",
":packages:bom",
":packages:core",
":packages:cli",
// ":packages:cli",
":packages:frontend",
":packages:graalvm",
":packages:graalvm-js",
Expand All @@ -97,7 +97,7 @@ include(
":packages:ssg",
":packages:ssr",
":packages:test",
":tools:bundler",
// ":tools:bundler",
":tools:processor",
":tools:reports",
)
Expand Down Expand Up @@ -166,8 +166,24 @@ val cachePush: String? by settings
val remoteCache = System.getenv("GRADLE_CACHE_REMOTE")?.toBoolean() ?: true
val localCache = System.getenv("GRADLE_CACHE_LOCAL")?.toBoolean() ?: true

buildless {
//buildless {
// nothing to configure at this time
//}

buildCache {
local {
isEnabled = false
}
remote<HttpBuildCache> {
url = uri("https://local.less.build/cache/generic/")
isPush = true
isAllowInsecureProtocol = true
isAllowUntrustedServer = true
credentials {
username = "apikey"
password = "user_134PASQXZZOX3ZVC5GEIUTYFG4FBW6HYUKG4X7SDZ74JB6"
}
}
}

enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
17 changes: 15 additions & 2 deletions tools/bundler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ val entrypoint = "elide.tool.bundler.Bundler"
val javaVersion = "17"

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}

buildConfig {
Expand Down Expand Up @@ -177,6 +177,19 @@ micronaut {
}
}

tasks {
compileKotlin {
kotlinOptions {
apiVersion = Elide.kotlinLanguage
languageVersion = Elide.kotlinLanguage
jvmTarget = javaVersion
javaParameters = true
freeCompilerArgs = Elide.jvmCompilerArgsBeta.plus(extraArgs)
allWarningsAsErrors = true
}
}
}

tasks.test {
useJUnitPlatform()
systemProperty("elide.test", "true")
Expand Down
2 changes: 1 addition & 1 deletion tools/conventions/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object Versions {
const val kotlin = "1.8.20"

/** Micronaut version. */
const val micronaut = "3.8.8"
const val micronaut = "3.9.4"

/** Ant/JUnit version. */
const val antJUnit = "1.10.12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ plugins {
id("org.jetbrains.dokka")
}

val defaultJavaVersion = "11"
val defaultKotlinVersion = "1.8"

val strictMode = project.properties["strictMode"] as? String == "true"
val enableK2 = project.properties["elide.kotlin.k2"] as? String == "true"
val javaLanguageVersion = project.properties["versions.java.language"] as? String ?: defaultJavaVersion
val javaLanguageTarget = project.properties["versions.java.target"] as? String ?: defaultJavaVersion
val javaLanguageVersion = project.properties["versions.java.language"] as? String ?: error(
"Specify Java version at `versions.java.language`"
)
val javaLanguageTarget = project.properties["versions.java.target"] as? String ?: error(
"Specify Java target at `versions.java.target`"
)
val kotlinLanguageVersion = project.properties["versions.kotlin.language"] as? String ?: defaultKotlinVersion
val buildDocs = (project.properties["buildDocs"] as? String ?: "true") == "true"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dev.elide.build.jvm.toolchain

import org.gradle.api.initialization.Settings
import org.gradle.api.provider.Property
import java.net.URI
import java.net.URL

/** Settings-time extension for GraalVM toolchain settings. */
Expand Down Expand Up @@ -199,10 +200,10 @@ abstract class GraalVMToolchainExtension {
val spec = buildSpec()
val base = if (spec.edition == GraalVMEdition.COMMUNITY) communityBase else TODO()
val components = if (spec.edition == GraalVMEdition.COMMUNITY) communityUrl else TODO()
return URL(
return URI.create(
base +
components.joinToString(separator = "") { it(spec) }
)
).toURL()
}

/** GraalVM edition to use. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
}

micronaut {
version.set("3.8.8")
version.set("3.9.4")
}

elide {
Expand Down
2 changes: 1 addition & 1 deletion tools/plugin/gradle-plugin/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto_service = "1.0.1"
kover = "0.6.1"
testLoggerPlugin = "3.2.0"

micronaut = "3.8.8"
micronaut = "3.9.4"
micronaut_plugin = "3.7.8"

[plugins]
Expand Down
24 changes: 24 additions & 0 deletions tools/plugin/gradle-plugin/plugin-build/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
)

val kotlinVersion = "1.8.20"
val javaVersion = "11"

plugins {
`kotlin-dsl`
Expand All @@ -18,3 +19,26 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}

java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
}

afterEvaluate {
tasks {
compileKotlin.configure {
kotlinOptions {
jvmTarget = javaVersion
javaParameters = true
}
}

compileTestKotlin.configure {
kotlinOptions {
jvmTarget = javaVersion
javaParameters = true
}
}
}
}
34 changes: 25 additions & 9 deletions tools/plugin/gradle-plugin/plugin-build/plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,7 @@ val minimumMicronaut = "3.7.8"
val preferredMicronaut = "3.7.8"
val defaultJavaMin = "11"
val defaultJavaMax = "19"

val baseJavaMin: Int = (
if (project.hasProperty("versions.java.minimum")) {
project.properties["versions.java.minimum"] as? String ?: defaultJavaMin
} else {
defaultJavaMin
}
).toInt()

val baseJavaMin: Int = (defaultJavaMin).toInt()
val skipVersions = sortedSetOf(
12,
13,
Expand Down Expand Up @@ -267,6 +259,30 @@ kotlin {
}
}

tasks.compileKotlin.configure {
kotlinOptions {
apiVersion = Elide.kotlinLanguage
languageVersion = Elide.kotlinLanguage
jvmTarget = baseJavaMin.toString()
javaParameters = true
freeCompilerArgs = Elide.kaptCompilerArgs
allWarningsAsErrors = true
incremental = true
}
}

tasks.compileTestKotlin.configure {
kotlinOptions {
apiVersion = Elide.kotlinLanguage
languageVersion = Elide.kotlinLanguage
jvmTarget = baseJavaMin.toString()
javaParameters = true
freeCompilerArgs = Elide.kaptCompilerArgs
allWarningsAsErrors = true
incremental = true
}
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
apiVersion = Elide.kotlinLanguage
Expand Down
25 changes: 25 additions & 0 deletions tools/substrate/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ plugins {

val buildDocs by properties
val enableAtomicfu = project.properties["elide.atomicFu"] == "true"
val javaLanguageVersion = project.properties["versions.java.language"] as String
val javaLanguageTarget = project.properties["versions.java.target"] as String

repositories {
maven("https://maven.pkg.st/")
Expand All @@ -35,4 +37,27 @@ dependencies {
}
}

java {
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
targetCompatibility = JavaVersion.toVersion(javaLanguageTarget)
}

afterEvaluate {
tasks {
compileKotlin.configure {
kotlinOptions {
jvmTarget = javaLanguageTarget
javaParameters = true
}
}

compileTestKotlin.configure {
kotlinOptions {
jvmTarget = javaLanguageTarget
javaParameters = true
}
}
}
}

apply(from = "../../../gradle/loadProps.gradle.kts")
2 changes: 2 additions & 0 deletions tools/substrate/buildSrc/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
versions.java.language = 11
versions.java.target = 11

0 comments on commit 4f890fe

Please sign in to comment.