diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..e228aab2e --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,36 @@ +--- +name: 'Build & Publish' + +on: # yamllint disable-line rule:truthy + push: + pull_request: + branches: + - master + +jobs: + build: + uses: metaborg/actions/.github/workflows/gradle-build-matrix.yaml@main + publish-snapshot: + uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main + with: + gradle-command: | + gradle :publish -Pgitonium.isSnapshot=true + gradle-version-command: | + gradle -q :printVersion -Pgitonium.isSnapshot=true + if: "github.event_name == 'push' && github.ref == 'refs/heads/master'" + needs: [build] + secrets: + METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} + METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} + publish-release: + uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main + with: + gradle-command: | + gradle :publish + gradle-version-command: | + gradle -q :printVersion + if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release-')" + needs: [build] + secrets: + METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} + METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..599f9523d --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,47 @@ +import org.metaborg.convention.Developer +import org.metaborg.convention.MavenPublishConventionExtension + +// Workaround for issue: https://youtrack.jetbrains.com/issue/KTIJ-19369 +@Suppress("DSL_SCOPE_VIOLATION") +plugins { + id("org.metaborg.convention.root-project") + alias(libs.plugins.gitonium) + alias(libs.plugins.spoofax.gradle.langspec) apply false +} + +rootProjectConvention { + // Add `publishAll` and `publish` tasks that delegate to the subprojects and included builds. + registerPublishTasks.set(true) +} + +allprojects { + apply(plugin = "org.metaborg.gitonium") + + // Configure Gitonium before setting the version + gitonium { + mainBranch.set("master") + } + + version = gitonium.version + group = "org.metaborg.devenv" + + pluginManager.withPlugin("org.metaborg.convention.maven-publish") { + extensions.configure(MavenPublishConventionExtension::class.java) { + repoOwner.set("metaborg") + repoName.set("jsglr") + + metadata { + inceptionYear.set("2005") + developers.set(listOf( + Developer("jasperdenkers", "Jasper Denkers", "jasperdenkers@gmail.com"), + Developer("mpsijm", "Maarten Sijm", "mpsijm@gmail.com"), + Developer("karltk", "Karl Trygve Kalleberg", "karltk@gmail.com"), + Developer("lennartcl", "Lennart Kats", "lclkats@gmail.com"), + Developer("maartje", "Maartje de Jonge", "maartjedejonge@gmail.com"), + Developer("Gohla", "Gabriel Konat", "gabrielkonat@gmail.com"), + Developer("udesou", "Eduardo Souza", "eduardo7.ufv@gmail.com"), + )) + } + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..de463ec2b --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,24 @@ +rootProject.name = "esv-project" + +dependencyResolutionManagement { + repositories { + maven("https://artifacts.metaborg.org/content/groups/public/") + mavenCentral() + } +} + +pluginManagement { + repositories { + maven("https://artifacts.metaborg.org/content/groups/public/") + gradlePluginPortal() + } +} + +plugins { + id("org.metaborg.convention.settings") version "latest.integration" +} + +include("org.spoofax.jsglr") +include("org.spoofax.jsglr2") +include("org.spoofax.interpreter.library.jsglr") +include("jsglr.shared")