[build] Setup project for cross-version Minecraft development
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import dev.panuszewski.gradle.pluginMarker
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
group = "de.siphalor.tweed5"
|
||||
|
||||
dependencies {
|
||||
implementation(project(":helpers"))
|
||||
implementation(pluginMarker(libs.plugins.lombok))
|
||||
implementation(pluginMarker(libs.plugins.shadow))
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@ plugins {
|
||||
id("dev.panuszewski.typesafe-conventions") version "0.9.0"
|
||||
}
|
||||
|
||||
typesafeConventions {
|
||||
autoPluginDependencies = false
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
||||
@@ -2,7 +2,7 @@ plugins {
|
||||
java
|
||||
`java-library`
|
||||
jacoco
|
||||
alias(libs.plugins.lombok)
|
||||
id("io.freefair.lombok")
|
||||
id("de.siphalor.tweed5.publishing")
|
||||
id("de.siphalor.tweed5.local-runtime-only")
|
||||
id("de.siphalor.tweed5.expanded-sources-jar")
|
||||
|
||||
@@ -3,7 +3,7 @@ import io.freefair.gradle.plugins.lombok.tasks.Delombok
|
||||
plugins {
|
||||
java
|
||||
`java-library`
|
||||
alias(libs.plugins.lombok)
|
||||
id("io.freefair.lombok")
|
||||
}
|
||||
|
||||
val expandedSourcesElements = configurations.consumable("expandedSourcesElements") {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
plugins {
|
||||
`maven-publish`
|
||||
alias(libs.plugins.shadow)
|
||||
id("com.gradleup.shadow")
|
||||
java
|
||||
`java-library`
|
||||
id("de.siphalor.tweed5.publishing")
|
||||
id("de.siphalor.tweed5.minecraft.mod.component")
|
||||
}
|
||||
|
||||
@@ -32,16 +32,3 @@ val minecraftModSourcesJar = tasks.register<Jar>("minecraftModSourcesJar") {
|
||||
|
||||
artifacts.add("minecraftModElements", minecraftModJar)
|
||||
artifacts.add("minecraftModSourcesElements", minecraftModSourcesJar)
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("minecraftMod") {
|
||||
groupId = "${project.group}.minecraft"
|
||||
artifactId = project.name
|
||||
version = project.version.toString()
|
||||
|
||||
from(components["minecraftMod"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
plugins {
|
||||
`maven-publish`
|
||||
id("de.siphalor.tweed5.publishing")
|
||||
id("de.siphalor.tweed5.minecraft.mod.base")
|
||||
}
|
||||
|
||||
@@ -27,3 +29,16 @@ tasks.named<Jar>("minecraftModSourcesJar") {
|
||||
from(project.layout.buildDirectory.dir("minecraftModResources"))
|
||||
dependsOn(processMinecraftModResources)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("minecraftMod") {
|
||||
groupId = "${project.group}.minecraft"
|
||||
artifactId = project.name
|
||||
version = project.version.toString()
|
||||
|
||||
from(components["minecraftMod"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.shadow)
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
val shadowOnlyConfiguration = configurations.dependencyScope("shadowOnly")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
java
|
||||
alias(libs.plugins.lombok)
|
||||
id("io.freefair.lombok")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
Reference in New Issue
Block a user