Skip to content

Commit

Permalink
Make repo build standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 25, 2024
1 parent bccab2a commit a88d7bb
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
47 changes: 47 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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", "[email protected]"),
Developer("mpsijm", "Maarten Sijm", "[email protected]"),
Developer("karltk", "Karl Trygve Kalleberg", "[email protected]"),
Developer("lennartcl", "Lennart Kats", "[email protected]"),
Developer("maartje", "Maartje de Jonge", "[email protected]"),
Developer("Gohla", "Gabriel Konat", "[email protected]"),
Developer("udesou", "Eduardo Souza", "[email protected]"),
))
}
}
}
}
24 changes: 24 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit a88d7bb

Please sign in to comment.