-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2678 from mbeddr/refactor/jbr-toolchain
build: upgrade to Gradle 8.12, introduce jbr-toolchain
- Loading branch information
Showing
15 changed files
with
72 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.gradle/ | ||
/build/ | ||
/.kotlin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
dependencies { | ||
fun plugin(alias: Provider<PluginDependency>) = alias.map { "${it.pluginId}:${it.pluginId}.gradle.plugin:${it.version}" } | ||
implementation(plugin(libs.plugins.common)) | ||
implementation(plugin(libs.plugins.jbr.toolchain)) | ||
} | ||
|
||
repositories { | ||
maven("https://artifacts.itemis.cloud/repository/maven-mps") | ||
gradlePluginPortal() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import org.gradle.api.provider.Provider | ||
import java.io.Serializable | ||
|
||
/** | ||
* Allow using a Provider for properties that accept an Object and call toString() on it, | ||
* such as [de.itemis.mps.gradle.RunAntScript.executable]. | ||
*/ | ||
class LazyString(private val source: Lazy<String>) : Serializable { | ||
constructor(source: () -> String) : this(lazy(source)) | ||
constructor(source: Provider<String>) : this(source::get) | ||
|
||
override fun toString() = source.value | ||
} |
16 changes: 16 additions & 0 deletions
16
build-logic/src/main/kotlin/buildlogic.mps-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import de.itemis.mps.gradle.RunAntScript | ||
|
||
plugins { | ||
id("com.specificlanguages.jbr-toolchain") | ||
id("de.itemis.mps.gradle.common") | ||
} | ||
|
||
// Use the JBR dependency from the version catalog | ||
dependencies { | ||
jbr(versionCatalogs.named("libs").findLibrary("jbr").get()) | ||
} | ||
|
||
// Use the specified JBR for all RunAntScript tasks | ||
tasks.withType<RunAntScript>().configureEach { | ||
executable = LazyString(jbrToolchain.javaLauncher.map { it.executablePath.toString() }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[plugins] | ||
common = "de.itemis.mps.gradle.common:1.28.+" | ||
jbr-toolchain = "com.specificlanguages.jbr-toolchain:1.0.0" | ||
|
||
[libraries] | ||
jbr = "com.jetbrains.jdk:jbr_jcef:17.0.8.1-b1000.32" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
plugins { | ||
id 'base' | ||
id 'maven-publish' | ||
id 'buildlogic.mps-conventions' | ||
} | ||
|
||
import de.itemis.mps.gradle.* | ||
|