diff --git a/src/main/kotlin/nmcp/NmcpAggregation.kt b/src/main/kotlin/nmcp/NmcpAggregation.kt index 9e6d4f3..19baa23 100644 --- a/src/main/kotlin/nmcp/NmcpAggregation.kt +++ b/src/main/kotlin/nmcp/NmcpAggregation.kt @@ -5,7 +5,6 @@ import org.gradle.api.artifacts.Configuration import org.gradle.api.provider.Property import javax.inject.Inject - abstract class NmcpAggregation @Inject constructor( private val configuration: Configuration, private val project: Project, diff --git a/tests/groovy/build.gradle b/tests/groovy/build.gradle new file mode 100644 index 0000000..096fe56 --- /dev/null +++ b/tests/groovy/build.gradle @@ -0,0 +1,76 @@ +plugins { + id("org.jetbrains.kotlin.jvm").version("1.9.22").apply(false) + id("com.gradleup.nmcp").version("0.0.7") +} + +group = "net.mbonnin.tnmcp" +version = "0.0.4" + +subprojects { + pluginManager.apply("org.jetbrains.kotlin.jvm") + pluginManager.apply("maven-publish") + pluginManager.apply("signing") + version = rootProject.version + + publishing.publications { + create("default", MavenPublication) { + from(project.components.findByName("java")) + artifact(tasks.register("emptySources", Jar) { + archiveClassifier = "sources" + }) + artifact(tasks.register("emptyDocs", Jar) { + archiveClassifier = "javadoc" + }) + + groupId = project.rootProject.group.toString() + version = project.rootProject.version.toString() + artifactId = project.name + + pom { + name.set(project.name) + packaging = "jar" + description.set(project.name) + url.set("https://github.com/martinbonnin/test-nmcp") + + scm { + url.set("https://github.com/martinbonnin/test-nmcp") + connection.set("https://github.com/martinbonnin/test-nmcp") + developerConnection.set("https://github.com/martinbonnin/test-nmcp") + } + + licenses { + license { + name.set("MIT License") + url.set("https://github.com/martinbonnin/test-nmcp/blob/master/LICENSE") + } + } + + developers { + developer { + id.set("mbonnin") + name.set("mbonnin") + } + } + } + } + } + + signing { + sign(publishing.publications) + useInMemoryPgpKeys( + System.getenv("GPG_PRIVATE_KEY"), + System.getenv("GPG_PRIVATE_KEY_PASSWORD") + ) + } + tasks.withType(Sign.class) { + enabled = System.getenv("GPG_PRIVATE_KEY") != null + } +} + +nmcp { + publishAllProjectsProbablyBreakingProjectIsolation { + username = System.getenv("MAVEN_CENTRAL_USERNAME") + password = System.getenv("MAVEN_CENTRAL_PASSWORD") + publicationType = "USER_MANAGED" + } +} diff --git a/tests/groovy/module1/build.gradle.kts b/tests/groovy/module1/build.gradle.kts new file mode 100644 index 0000000..e69de29 diff --git a/tests/groovy/module1/src/main/kotlin/net/mbonnin/test/nmcp1/Hello.kt b/tests/groovy/module1/src/main/kotlin/net/mbonnin/test/nmcp1/Hello.kt new file mode 100644 index 0000000..b61837f --- /dev/null +++ b/tests/groovy/module1/src/main/kotlin/net/mbonnin/test/nmcp1/Hello.kt @@ -0,0 +1,3 @@ +package net.mbonnin.test.nmcp1 + +val hello = "Hello from module1" \ No newline at end of file diff --git a/tests/groovy/module2/build.gradle.kts b/tests/groovy/module2/build.gradle.kts new file mode 100644 index 0000000..e69de29 diff --git a/tests/groovy/module2/src/main/kotlin/net/mbonnin/test/nmcp2/Hello.kt b/tests/groovy/module2/src/main/kotlin/net/mbonnin/test/nmcp2/Hello.kt new file mode 100644 index 0000000..10c641f --- /dev/null +++ b/tests/groovy/module2/src/main/kotlin/net/mbonnin/test/nmcp2/Hello.kt @@ -0,0 +1,3 @@ +package net.mbonnin.test.nmcp2 + +val hello = "Hello from module2" \ No newline at end of file diff --git a/tests/groovy/settings.gradle.kts b/tests/groovy/settings.gradle.kts new file mode 100644 index 0000000..ea63f41 --- /dev/null +++ b/tests/groovy/settings.gradle.kts @@ -0,0 +1,11 @@ +pluginManagement { + includeBuild("../../") + listOf(repositories, dependencyResolutionManagement.repositories).forEach { + it.apply { + mavenCentral() + google() + } + } +} + +include(":module1", ":module2") \ No newline at end of file