Skip to content

Commit

Permalink
Add explicit language source/compile dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 19, 2024
1 parent ff37be4 commit 87979ba
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/empty/empty.example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ spoofaxProject {
}

dependencies {
compileOnly(libs.spoofax2.core)
compileOnly(libs.spoofax.core)
}
2 changes: 1 addition & 1 deletion example/empty/empty.test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ spoofaxTest {

dependencies {
compileLanguage(project(":empty"))
compileOnly(libs.spoofax2.core)
compileOnly(libs.spoofax.core)
}
10 changes: 9 additions & 1 deletion example/empty/empty/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {
}

spoofaxLanguageSpecification {
addCompileDependenciesFromMetaborgYaml.set(false)
addSourceDependenciesFromMetaborgYaml.set(false)

// Fixes: Could not resolve all dependencies for configuration '<project>:compileClasspath'.
// The project declares repositories, effectively ignoring the repositories you have declared in the settings.
addSpoofaxRepository.set(false)
Expand All @@ -13,5 +16,10 @@ spoofaxLanguageSpecification {
}

dependencies {
compileOnly(libs.spoofax2.core)
compileLanguage(libs.esv.lang)
compileLanguage(libs.sdf3.lang)

sourceLanguage(libs.meta.lib.spoofax)

compileOnly(libs.spoofax.core)
}
5 changes: 4 additions & 1 deletion example/language_contribution_addition/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ plugins {
}

spoofaxLanguageSpecification {
addCompileDependenciesFromMetaborgYaml.set(false)
addSourceDependenciesFromMetaborgYaml.set(false)

languageContributions.add(LanguageContributionIdentifier(
LanguageIdentifier("$group.test", "${name}_test", LanguageVersion.parse("$version-test")), "lca"))

Expand All @@ -18,5 +21,5 @@ spoofaxLanguageSpecification {
}

dependencies {
compileOnly(libs.spoofax2.core)
compileOnly(libs.spoofax.core)
}
5 changes: 4 additions & 1 deletion example/language_contribution_override/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ plugins {
}

spoofaxLanguageSpecification {
addCompileDependenciesFromMetaborgYaml.set(false)
addSourceDependenciesFromMetaborgYaml.set(false)
addLanguageContributionsFromMetaborgYaml.set(false)

languageContributions.add(LanguageContributionIdentifier(LanguageIdentifier(
group.toString(), name, LanguageVersion.parse(version.toString())), "lco"))

Expand All @@ -19,5 +22,5 @@ spoofaxLanguageSpecification {
}

dependencies {
compileOnly(libs.spoofax2.core)
compileOnly(libs.spoofax.core)
}
10 changes: 9 additions & 1 deletion example/stratego_format_override/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {
}

spoofaxLanguageSpecification {
addCompileDependenciesFromMetaborgYaml.set(false)
addSourceDependenciesFromMetaborgYaml.set(false)

strategoFormat.set(org.metaborg.spoofax.meta.core.config.StrategoFormat.jar)

// Fixes: Could not resolve all dependencies for configuration '<project>:compileClasspath'.
Expand All @@ -15,5 +18,10 @@ spoofaxLanguageSpecification {
}

dependencies {
compileOnly(libs.spoofax2.core)
compileLanguage(libs.esv.lang)
compileLanguage(libs.sdf3.lang)

sourceLanguage(libs.meta.lib.spoofax)

compileOnly(libs.spoofax.core)
}
2 changes: 1 addition & 1 deletion plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
group = "org.metaborg.devenv"

dependencies {
api(libs.spoofax2.meta.core)
api(libs.spoofax.meta.core)
api(libs.spt.core)

/*
Expand Down

0 comments on commit 87979ba

Please sign in to comment.