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 24, 2024
1 parent 1000f23 commit f804b33
Show file tree
Hide file tree
Showing 4 changed files with 103 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 }}
45 changes: 45 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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("esv")

metadata {
inceptionYear.set("2007")
developers.set(listOf(
Developer("lennartcl", "Lennart Kats", "[email protected]"),
Developer("Gohla", "Gabriel Konat", "[email protected]"),
Developer("hendrikvanantwerpen", "Hendrik van Antwerpen", "[email protected]"),
Developer("maartje", "Maartje de Jonge", "[email protected]"),
Developer("oskar-van-rest", "Oskar van Rest", "[email protected]"),
))
}
}
}
}
1 change: 1 addition & 0 deletions org.metaborg.meta.lang.esv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spoofaxLanguageSpecification {
addSpoofaxCoreDependency.set(false)
addSpoofaxRepository.set(false)
}

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

Expand Down
21 changes: 21 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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.metaborg.meta.lang.esv")

0 comments on commit f804b33

Please sign in to comment.