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 ee414f5 commit 3846718
Show file tree
Hide file tree
Showing 3 changed files with 106 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("mb-rep")

metadata {
inceptionYear.set("2006")
developers.set(listOf(
Developer("Gohla", "Gabriel Konat", "gabrielkonat@gmail.com"),
Developer("lennartcl", "Lennart Kats", "lclkats@gmail.com"),
Developer("adilakhter", "Adil Akhter", "md.adilakhter@gmail.com"),
Developer("karltk", "Karl Trygve Kalleberg", "karltk@gmail.com"),
Developer("hendrikvanantwerpen", "Hendrik van Antwerpen", "hendrik@van-antwerpen.net"),
Developer("Apanatshka", "Jeff Smits", "mail@jeffsmits.net"),
Developer("Virtlink", "Daniel A. A. Pelsmaeker", "developer@pelsmaeker.net"),
))
}
}
}
}
23 changes: 23 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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.terms")
include("org.spoofax.interpreter.library.index")

0 comments on commit 3846718

Please sign in to comment.