[build] project structure and publishing improvements
This commit is contained in:
@@ -6,10 +6,6 @@ plugins {
|
||||
group = "de.siphalor.tweed5"
|
||||
version = properties["version"]!!
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
rootProject.subprojects.forEach { subproject ->
|
||||
subproject.plugins.withId("jacoco") {
|
||||
|
||||
@@ -2,10 +2,6 @@ plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":helpers"))
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
`java-gradle-plugin`
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins.register("minecraftModComponent") {
|
||||
id = "de.siphalor.tweed5.minecraft.mod.component"
|
||||
|
||||
@@ -2,6 +2,12 @@ plugins {
|
||||
id("dev.panuszewski.typesafe-conventions") version "0.7.3"
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
include("helpers")
|
||||
|
||||
rootProject.name = "tweed5-conventions"
|
||||
|
||||
@@ -2,24 +2,17 @@ plugins {
|
||||
java
|
||||
`java-library`
|
||||
jacoco
|
||||
`maven-publish`
|
||||
alias(libs.plugins.lombok)
|
||||
id("de.siphalor.tweed5.publishing")
|
||||
id("de.siphalor.tweed5.local-runtime-only")
|
||||
id("de.siphalor.tweed5.expanded-sources-jar")
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.toVersion(libs.versions.java.main.get())
|
||||
targetCompatibility = JavaVersion.toVersion(libs.versions.java.main.get())
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
val testAgent = configurations.dependencyScope("mockitoAgent")
|
||||
val testAgentClasspath = configurations.resolvable("testAgentClasspath") {
|
||||
isTransitive = false
|
||||
|
||||
@@ -7,6 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
val expandedSourcesElements = configurations.consumable("expandedSourcesElements") {
|
||||
extendsFrom(configurations.implementation.get())
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
plugins {
|
||||
`maven-publish`
|
||||
alias(libs.plugins.shadow)
|
||||
id("de.siphalor.tweed5.expanded-sources-jar")
|
||||
java
|
||||
`java-library`
|
||||
id("de.siphalor.tweed5.minecraft.mod.component")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
plugins {
|
||||
java
|
||||
id("de.siphalor.tweed5.minecraft.mod.base")
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
if (project.hasProperty("siphalor.maven.user")) {
|
||||
maven {
|
||||
name = "Siphalor"
|
||||
url = uri("https://maven.siphalor.de/upload.php")
|
||||
credentials {
|
||||
username = project.property("siphalor.maven.user") as String
|
||||
password = project.property("siphalor.maven.password") as String
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publications.all {
|
||||
if (this is MavenPublication) {
|
||||
pom {
|
||||
url.set("https://github.com/Siphalor/tweed-5")
|
||||
scm {
|
||||
url.set("https://github.com/Siphalor/tweed-5")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
alias(libs.plugins.lombok)
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":tweed5-serde-api"))
|
||||
implementation(platform(libs.junit.platform))
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
plugins {
|
||||
`maven-publish`
|
||||
id("de.siphalor.tweed5.base-module")
|
||||
id("de.siphalor.tweed5.publishing")
|
||||
id("de.siphalor.tweed5.minecraft.mod.dummy")
|
||||
}
|
||||
|
||||
val bundledSourcesConfiguration = configurations.resolvable("bundledSources") {
|
||||
extendsFrom(configurations.implementation.get())
|
||||
isTransitive = true
|
||||
attributes {
|
||||
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":tweed5-core"))
|
||||
implementation(project(":tweed5-attributes-extension"))
|
||||
@@ -18,3 +25,13 @@ dependencies {
|
||||
tasks.shadowJar {
|
||||
relocate("org.objectweb.asm", "de.siphalor.tweed5.shadowed.org.objectweb.asm")
|
||||
}
|
||||
|
||||
tasks.register<Jar>("sourcesJar") {
|
||||
inputs.files(bundledSourcesConfiguration)
|
||||
from(
|
||||
bundledSourcesConfiguration.get().resolve()
|
||||
.filter { it.name.startsWith(rootProject.name) }
|
||||
.map { zipTree(it) }
|
||||
)
|
||||
archiveClassifier.set("sources")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
rootProject.name = "tweed5"
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
include("test-utils")
|
||||
include("tweed5-annotation-inheritance")
|
||||
include("tweed5-attributes-extension")
|
||||
|
||||
Reference in New Issue
Block a user