Skip to content

Commit

Permalink
Move depman project here
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 13, 2024
1 parent b08207f commit ee03b8f
Show file tree
Hide file tree
Showing 11 changed files with 1,065 additions and 13 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![GitHub Release][github-release-badge]][github-release]
[![Documentation][documentation-badge]][documentation]

The Metaborg Gradle convention and development plugins.
The Metaborg Gradle convention and development plugins, and the Metaborg dependency management and Gradle platform.

[![Documentation][documentation-button]][documentation]

Expand All @@ -14,6 +14,8 @@ The Metaborg Gradle convention and development plugins.
| `org.metaborg.convention.java` | [![org.metaborg.convention.java][maven-badge:convention.java]][maven:convention.java] |
| `org.metaborg.convention.maven-publish` | [![org.metaborg.convention.maven-publish][maven-badge:convention.maven-publish]][maven:convention.maven-publish] |
| `org.metaborg.convention.root-project` | [![org.metaborg.convention.root-project][maven-badge:convention.root-project]][maven:convention.root-project] |
| `org.metaborg:catalog` | [![org.metaborg.spoofax3:catalog][maven-badge:catalog]][maven:catalog] |
| `org.metaborg:platform` | [![org.metaborg.spoofax3:platform][maven-badge:platform]][maven:platform] |



Expand All @@ -26,6 +28,11 @@ The `org.metaborg.convention` plugins applies any conventional configuration to
- `org.metaborg.convention.root-project`: Configures the root project of a Gradle multi-project build.


## Gradle Dependency Management
The `org.metaborg:catalog` artifact provides recommended versions for dependencies, and should be used in projects that are part of Spoofax.

The `org.metaborg:platform` artifact enforces particular versions for Spoofax dependencies, and should be used by consumers of Spoofax libraries.


## License
Copyright 2024 Delft University of Technology
Expand All @@ -48,18 +55,16 @@ https://img.shields.io/github/actions/workflow/status/metaborg/metaborg-gradle/b
[documentation-button]: https://img.shields.io/badge/Documentation-blue?style=for-the-badge&logo=googledocs&logoColor=white


|-----------------------------------------|------------------------------------------------------------------------------------------------------------------|
| `org.metaborg.convention.settings` | [![org.metaborg.convention.settings][maven-badge:convention.settings]][maven:convention.settings] |
| `org.metaborg.convention.java` | [![org.metaborg.convention.java][maven-badge:convention.java]][maven:convention.java] |
| `org.metaborg.convention.maven-publish` | [![org.metaborg.convention.maven-publish][maven-badge:convention.maven-publish]][maven:convention.maven-publish] |
| `org.metaborg.convention.root-project` | [![org.metaborg.convention.root-project][maven-badge:convention.root-project]][maven:convention.root-project] |

[maven-badge:convention.settings]: https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifacts.metaborg.org%2Fcontent%2Frepositories%2Freleases%2Forg%2Fmetaborg%2Fconvention%2Fsettings%2Forg.metaborg.convention.settings.gradle.plugin%2Fmaven-metadata.xml
[maven-badge:convention.java]: https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifacts.metaborg.org%2Fcontent%2Frepositories%2Freleases%2Forg%2Fmetaborg%2Fconvention%2Fjava%2Forg.metaborg.convention.java.gradle.plugin%2Fmaven-metadata.xml
[maven-badge:convention.maven-publish]: https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifacts.metaborg.org%2Fcontent%2Frepositories%2Freleases%2Forg%2Fmetaborg%2Fconvention%2Fmaven-publish%2Forg.metaborg.convention.maven-publish.gradle.plugin%2Fmaven-metadata.xml
[maven-badge:convention.root-project]: https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifacts.metaborg.org%2Fcontent%2Frepositories%2Freleases%2Forg%2Fmetaborg%2Fconvention%2Froot-project%2Forg.metaborg.convention.root-project.gradle.plugin%2Fmaven-metadata.xml
[maven-badge:catalog]: https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifacts.metaborg.org%2Fcontent%2Frepositories%2Freleases%2Forg%2Fmetaborg%2Fcatalog%2Fmaven-metadata.xml
[maven-badge:platform]: https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifacts.metaborg.org%2Fcontent%2Frepositories%2Freleases%2Forg%2Fmetaborg%2Fplatform%2Fmaven-metadata.xml

[maven:convention.settings]: https://artifacts.metaborg.org/#nexus-search;gav~org.metaborg.convention.settings~org.metaborg.convention.settings.gradle.plugin~~~
[maven:convention.java]: https://artifacts.metaborg.org/#nexus-search;gav~org.metaborg.convention.java~org.metaborg.convention.java.gradle.plugin~~~
[maven:convention.maven-publish]: https://artifacts.metaborg.org/#nexus-search;gav~org.metaborg.convention.maven-publish~org.metaborg.convention.maven-publish.gradle.plugin~~~
[maven:convention.root-project]: https://artifacts.metaborg.org/#nexus-search;gav~org.metaborg.convention.root-project~org.metaborg.convention.root-project.gradle.plugin~~~
[maven:catalog]: https://artifacts.metaborg.org/#nexus-search;gav~org.metaborg~catalog~~~
[maven:platform]: https://artifacts.metaborg.org/#nexus-search;gav~org.metaborg~platform~~~
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.metaborg.convention.MavenPublishConventionExtension

plugins {
id("org.metaborg.convention.root-project")
}
19 changes: 19 additions & 0 deletions depman/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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)
}

allprojects {
group = "org.metaborg"

pluginManager.withPlugin("org.metaborg.convention.maven-publish") {
extensions.configure(MavenPublishConventionExtension::class.java) {
repoOwner.set("metaborg")
repoName.set("metaborg-gradle")
}
}
}
41 changes: 41 additions & 0 deletions depman/catalog/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
plugins {
`version-catalog`
`maven-publish`
signing
}

group = "org.metaborg"
description = "A Spoofax 3 catalog."

// WORKAROUND: Normally the generateCatalogAsToml task is used to generate the TOML file,
// but this task cannot be run before the configuration phase. Therefore, there is a chicken-and-egg
// problem, where this project needs to be configured to run the generateCatalogAsToml task,
// yet the generateCatalogAsToml task must be run before the projects can be configured.
// To workaround this, I use an explicit TOML file and bypass the generateCatalogAsToml task
// to just report the existing TOML file as its artifact.
// From: https://github.com/gradle/gradle/issues/19288#issuecomment-1399277313
configurations.versionCatalogElements {
outgoing.artifacts.clear()
outgoing.artifact(layout.projectDirectory.dir("../gradle/libs.versions.toml"))
}

catalog {
versionCatalog {
from(files("../gradle/libs.versions.toml"))
}
}

publishing {
publications {
create<MavenPublication>("mavenCatalog") {
from(components["versionCatalog"])
pom {
name.set("Spoofax 3 Catalog")
}
}
}
}

// signing {
// sign(publishing.publications["mavenCatalog"])
// }
Loading

0 comments on commit ee03b8f

Please sign in to comment.