[build] project structure and publishing improvements
This commit is contained in:
@@ -6,10 +6,6 @@ plugins {
|
|||||||
group = "de.siphalor.tweed5"
|
group = "de.siphalor.tweed5"
|
||||||
version = properties["version"]!!
|
version = properties["version"]!!
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
rootProject.subprojects.forEach { subproject ->
|
rootProject.subprojects.forEach { subproject ->
|
||||||
subproject.plugins.withId("jacoco") {
|
subproject.plugins.withId("jacoco") {
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ plugins {
|
|||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":helpers"))
|
implementation(project(":helpers"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ plugins {
|
|||||||
`java-gradle-plugin`
|
`java-gradle-plugin`
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
plugins.register("minecraftModComponent") {
|
plugins.register("minecraftModComponent") {
|
||||||
id = "de.siphalor.tweed5.minecraft.mod.component"
|
id = "de.siphalor.tweed5.minecraft.mod.component"
|
||||||
|
|||||||
@@ -2,6 +2,12 @@ plugins {
|
|||||||
id("dev.panuszewski.typesafe-conventions") version "0.7.3"
|
id("dev.panuszewski.typesafe-conventions") version "0.7.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include("helpers")
|
include("helpers")
|
||||||
|
|
||||||
rootProject.name = "tweed5-conventions"
|
rootProject.name = "tweed5-conventions"
|
||||||
|
|||||||
@@ -2,24 +2,17 @@ plugins {
|
|||||||
java
|
java
|
||||||
`java-library`
|
`java-library`
|
||||||
jacoco
|
jacoco
|
||||||
`maven-publish`
|
|
||||||
alias(libs.plugins.lombok)
|
alias(libs.plugins.lombok)
|
||||||
|
id("de.siphalor.tweed5.publishing")
|
||||||
id("de.siphalor.tweed5.local-runtime-only")
|
id("de.siphalor.tweed5.local-runtime-only")
|
||||||
id("de.siphalor.tweed5.expanded-sources-jar")
|
id("de.siphalor.tweed5.expanded-sources-jar")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = rootProject.group
|
|
||||||
version = rootProject.version
|
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.toVersion(libs.versions.java.main.get())
|
sourceCompatibility = JavaVersion.toVersion(libs.versions.java.main.get())
|
||||||
targetCompatibility = JavaVersion.toVersion(libs.versions.java.main.get())
|
targetCompatibility = JavaVersion.toVersion(libs.versions.java.main.get())
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
val testAgent = configurations.dependencyScope("mockitoAgent")
|
val testAgent = configurations.dependencyScope("mockitoAgent")
|
||||||
val testAgentClasspath = configurations.resolvable("testAgentClasspath") {
|
val testAgentClasspath = configurations.resolvable("testAgentClasspath") {
|
||||||
isTransitive = false
|
isTransitive = false
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val expandedSourcesElements = configurations.consumable("expandedSourcesElements") {
|
val expandedSourcesElements = configurations.consumable("expandedSourcesElements") {
|
||||||
|
extendsFrom(configurations.implementation.get())
|
||||||
attributes {
|
attributes {
|
||||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||||
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
|
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
alias(libs.plugins.shadow)
|
alias(libs.plugins.shadow)
|
||||||
id("de.siphalor.tweed5.expanded-sources-jar")
|
java
|
||||||
|
`java-library`
|
||||||
id("de.siphalor.tweed5.minecraft.mod.component")
|
id("de.siphalor.tweed5.minecraft.mod.component")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
|
||||||
id("de.siphalor.tweed5.minecraft.mod.base")
|
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)
|
alias(libs.plugins.lombok)
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":tweed5-serde-api"))
|
implementation(project(":tweed5-serde-api"))
|
||||||
implementation(platform(libs.junit.platform))
|
implementation(platform(libs.junit.platform))
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
`maven-publish`
|
id("de.siphalor.tweed5.publishing")
|
||||||
id("de.siphalor.tweed5.base-module")
|
|
||||||
id("de.siphalor.tweed5.minecraft.mod.dummy")
|
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 {
|
dependencies {
|
||||||
implementation(project(":tweed5-core"))
|
implementation(project(":tweed5-core"))
|
||||||
implementation(project(":tweed5-attributes-extension"))
|
implementation(project(":tweed5-attributes-extension"))
|
||||||
@@ -18,3 +25,13 @@ dependencies {
|
|||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
relocate("org.objectweb.asm", "de.siphalor.tweed5.shadowed.org.objectweb.asm")
|
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"
|
rootProject.name = "tweed5"
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include("test-utils")
|
include("test-utils")
|
||||||
include("tweed5-annotation-inheritance")
|
include("tweed5-annotation-inheritance")
|
||||||
include("tweed5-attributes-extension")
|
include("tweed5-attributes-extension")
|
||||||
|
|||||||
Reference in New Issue
Block a user