Skip to content

Commit

Permalink
Use platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 21, 2024
1 parent 0daa16e commit 78dc1df
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/empty/empty.example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ spoofaxProject {


dependencies {
api(platform(libs.metaborg.platform)) { version { require("latest.integration") } }

compileLanguage(project(":empty"))

compileOnly(libs.spoofax.core)
Expand Down
3 changes: 3 additions & 0 deletions example/empty/empty.test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spoofaxTest {
}

dependencies {
api(platform(libs.metaborg.platform)) { version { require("latest.integration") } }

compileLanguage(project(":empty"))

compileOnly(libs.spoofax.core)
}
2 changes: 2 additions & 0 deletions example/empty/empty/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spoofaxLanguageSpecification {
}

dependencies {
api(platform(libs.metaborg.platform)) { version { require("latest.integration") } }

compileLanguage(libs.esv.lang)
compileLanguage(libs.sdf3.lang)

Expand Down
2 changes: 2 additions & 0 deletions example/stratego_format_override/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ spoofaxLanguageSpecification {
}

dependencies {
api(platform(libs.metaborg.platform)) { version { require("latest.integration") } }

compileLanguage(libs.esv.lang)
compileLanguage(libs.sdf3.lang)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ internal fun SpoofaxExtensionBase.overrideIdentifiers(configOverrides: SpoofaxGr

internal fun SpoofaxExtensionBase.overrideDependencies(configOverrides: SpoofaxGradleConfigOverrides) {
configOverrides.update(project) {
// FIXME: Cannot use a plarform(...) dependency, as you'll get an error later in the pipeline that the platform
// dependency is not a Spoofax language. It is not clear how to distinguish normal from platform or enforcePlatform
// dependencies.
// TODO: I think this should become `project.compileLanguageFiles.incoming.resolutionResult`, but I'm not sure what
// to do with project(...) dependencies, as they don't have a group:module:version ID.
compileDeps = project.compileLanguageFiles.resolvedConfiguration.firstLevelModuleDependencies.map {
it.toSpoofaxDependency()
}
Expand Down

0 comments on commit 78dc1df

Please sign in to comment.