diff --git a/build.gradle.kts b/build.gradle.kts index e469590a..43083252 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,6 +5,7 @@ */ import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn +import tools.refinery.gradle.MavenPublishPlugin plugins { alias(pluginLibs.plugins.versions) diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts index 5dc4d934..ec81e029 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts @@ -12,7 +12,6 @@ plugins { jacoco java id("tools.refinery.gradle.eclipse") - id("tools.refinery.gradle.maven-publish") } repositories { @@ -27,7 +26,6 @@ configurations.testRuntimeClasspath { val libs = the() dependencies { - implementation(platform(project(":refinery-bom-dependencies"))) compileOnly(libs.jetbrainsAnnotations) testCompileOnly(libs.jetbrainsAnnotations) testImplementation(libs.hamcrest) @@ -51,10 +49,6 @@ java { } } -publishing.publications.named("mavenJava") { - from(components["java"]) -} - tasks { test { useJUnitPlatform { diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts index 1292620a..73696301 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts @@ -23,6 +23,7 @@ val libs = the() dependencies { implementation(libs.slf4j.simple) implementation(libs.slf4j.log4j) + implementation(enforcedPlatform(project(":refinery-bom-dependencies"))) } // See https://github.com/johnrengelman/shadow/issues/586 diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-library.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-library.gradle.kts index 3aff3833..3f68057a 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-library.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-library.gradle.kts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors + * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors * * SPDX-License-Identifier: EPL-2.0 */ @@ -8,4 +8,13 @@ package tools.refinery.gradle plugins { `java-library` id("tools.refinery.gradle.internal.java-conventions") + id("tools.refinery.gradle.maven-publish") +} + +dependencies { + api(platform(project(":refinery-bom-dependencies"))) +} + +publishing.publications.named("mavenJava") { + from(components["java"]) } diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-test-fixtures.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-test-fixtures.gradle.kts index 004be8b4..ea3e8bca 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-test-fixtures.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-test-fixtures.gradle.kts @@ -11,6 +11,7 @@ import tools.refinery.gradle.utils.EclipseUtils plugins { `java-test-fixtures` id("tools.refinery.gradle.internal.java-conventions") + id("tools.refinery.gradle.maven-publish") } publishing.publications { diff --git a/subprojects/bom/build.gradle.kts b/subprojects/bom/build.gradle.kts index 61c55391..8a7c3610 100644 --- a/subprojects/bom/build.gradle.kts +++ b/subprojects/bom/build.gradle.kts @@ -4,6 +4,8 @@ * SPDX-License-Identifier: EPL-2.0 */ +import tools.refinery.gradle.JavaLibraryPlugin + plugins { id("tools.refinery.gradle.maven-bom") } @@ -25,7 +27,7 @@ dependencies { gradle.projectsEvaluated { dependencies.constraints { for (subproject in rootProject.subprojects) { - if (subproject.plugins.hasPlugin(JavaPlugin::class)) { + if (subproject.plugins.hasPlugin(JavaLibraryPlugin::class)) { api(project(subproject.path)) } } diff --git a/subprojects/docs/build.gradle.kts b/subprojects/docs/build.gradle.kts index 631df761..ab67128a 100644 --- a/subprojects/docs/build.gradle.kts +++ b/subprojects/docs/build.gradle.kts @@ -5,6 +5,7 @@ */ import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn +import tools.refinery.gradle.JavaLibraryPlugin import tools.refinery.gradle.utils.SonarPropertiesUtils plugins { @@ -24,7 +25,7 @@ val javadocs: Configuration by configurations.creating { dependencies { gradle.projectsEvaluated { for (subproject in rootProject.subprojects) { - if (subproject.plugins.hasPlugin(JavaPlugin::class)) { + if (subproject.plugins.hasPlugin(JavaLibraryPlugin::class)) { javadocs(project(subproject.path, "javadocElements")) } } diff --git a/subprojects/docs/src/develop/javadoc.md b/subprojects/docs/src/develop/javadoc.md index 225e9de0..e94e3eab 100644 --- a/subprojects/docs/src/develop/javadoc.md +++ b/subprojects/docs/src/develop/javadoc.md @@ -12,12 +12,10 @@ Here you can find API documentation for Refinery components automatically genera # Refinery * [`tools.refinery:refinery-generator`](pathname://refinery-generator) -* [`tools.refinery:refinery-generator-cli`](pathname://refinery-generator-cli) * [`tools.refinery:refinery-language`](pathname://refinery-language) * [`tools.refinery:refinery-language-ide`](pathname://refinery-language-ide) * [`tools.refinery:refinery-language-model`](pathname://refinery-language-model) * [`tools.refinery:refinery-language-semantics`](pathname://refinery-language-semantics) -* [`tools.refinery:refinery-language-web`](pathname://refinery-language-web) * [`tools.refinery:refinery-logic`](pathname://refinery-logic) * [`tools.refinery:refinery-store`](pathname://refinery-store) * [`tools.refinery:refinery-store-dse`](pathname://refinery-store-dse) diff --git a/subprojects/generator-cli/build.gradle.kts b/subprojects/generator-cli/build.gradle.kts index da6c92f6..6c681222 100644 --- a/subprojects/generator-cli/build.gradle.kts +++ b/subprojects/generator-cli/build.gradle.kts @@ -8,11 +8,6 @@ plugins { id("tools.refinery.gradle.java-application") } -mavenArtifact { - name = "Generator CLI" - description = "CLI for model generation" -} - dependencies { implementation(project(":refinery-generator")) implementation(libs.jcommander) diff --git a/subprojects/language-web/build.gradle.kts b/subprojects/language-web/build.gradle.kts index 73e80b1d..00570e48 100644 --- a/subprojects/language-web/build.gradle.kts +++ b/subprojects/language-web/build.gradle.kts @@ -9,10 +9,6 @@ plugins { id("tools.refinery.gradle.xtext-generated") } -mavenArtifact { - description = "Cloud-based partial modeling environment" -} - val webapp: Configuration by configurations.creating { isCanBeConsumed = false isCanBeResolved = true diff --git a/subprojects/versions/build.gradle.kts b/subprojects/versions/build.gradle.kts index cf446753..0cc9e811 100644 --- a/subprojects/versions/build.gradle.kts +++ b/subprojects/versions/build.gradle.kts @@ -4,6 +4,8 @@ * SPDX-License-Identifier: EPL-2.0 */ +import tools.refinery.gradle.JavaLibraryPlugin + plugins { `version-catalog` id("tools.refinery.gradle.maven-publish") @@ -33,7 +35,7 @@ publishing.publications.named("mavenJava") { gradle.projectsEvaluated { catalog.versionCatalog { for (subproject in rootProject.subprojects) { - if (subproject.plugins.hasPlugin(JavaPlugin::class)) { + if (subproject.plugins.hasPlugin(JavaLibraryPlugin::class)) { val alias = subproject.name.removePrefix("refinery-") val group = subproject.group.toString() val versionRef = if (interpreterGroup == group) interpreterVersion else refineryVersion