-
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 remote-tracking branch 'origin/merge/mps20243' into maintenance…
…/mps20243
- Loading branch information
Showing
27 changed files
with
2,012 additions
and
330 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
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
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
Oops, something went wrong.