2021-07-22 10:14:25 -07:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "eclipse"
|
|
|
|
id "maven-publish"
|
|
|
|
}
|
2019-12-27 12:23:07 -07:00
|
|
|
|
|
|
|
sourceCompatibility = targetCompatibility = 1.8
|
2021-07-22 10:47:28 -07:00
|
|
|
compileJava {
|
|
|
|
sourceCompatibility = targetCompatibility = 1.8
|
|
|
|
}
|
2019-12-27 12:23:07 -07:00
|
|
|
|
2021-07-22 10:14:25 -07:00
|
|
|
version = "${fw_version}${-> getVersionSuffix()}"
|
2019-12-27 12:23:07 -07:00
|
|
|
group = "io.github.zekerzhayard"
|
|
|
|
archivesBaseName = rootProject.name
|
|
|
|
|
2021-07-22 10:14:25 -07:00
|
|
|
configurations {
|
|
|
|
provided {
|
2021-08-13 07:48:17 -07:00
|
|
|
implementation.extendsFrom provided
|
2021-07-22 10:14:25 -07:00
|
|
|
}
|
2021-07-22 10:47:28 -07:00
|
|
|
multirelase {
|
2021-08-13 07:48:17 -07:00
|
|
|
implementation.extendsFrom multirelase
|
2021-07-22 10:47:28 -07:00
|
|
|
}
|
2021-07-22 10:14:25 -07:00
|
|
|
}
|
|
|
|
|
2019-12-27 12:23:07 -07:00
|
|
|
repositories {
|
2021-07-22 10:14:25 -07:00
|
|
|
mavenCentral()
|
2019-12-27 12:23:07 -07:00
|
|
|
maven {
|
|
|
|
name = "forge"
|
2021-07-22 10:14:25 -07:00
|
|
|
url = "https://maven.minecraftforge.net/"
|
2019-12-27 12:23:07 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-11-17 06:42:16 -07:00
|
|
|
compileOnly "com.google.code.gson:gson:2.8.7"
|
2021-07-22 10:14:25 -07:00
|
|
|
compileOnly "cpw.mods:modlauncher:8.0.9"
|
2024-02-28 17:48:02 -07:00
|
|
|
compileOnly "net.minecraftforge:installer:2.2.7"
|
2021-07-22 10:14:25 -07:00
|
|
|
compileOnly "net.sf.jopt-simple:jopt-simple:5.0.4"
|
|
|
|
|
2021-08-13 07:48:17 -07:00
|
|
|
provided project(":common")
|
2021-12-10 23:35:56 -07:00
|
|
|
provided project(":legacy")
|
2021-07-22 10:47:28 -07:00
|
|
|
multirelase project(":jigsaw")
|
2021-07-22 10:14:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withSourcesJar()
|
2019-12-27 12:23:07 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
2021-07-22 10:14:25 -07:00
|
|
|
manifest.attributes([
|
|
|
|
"Specification-Title": "${project.name}",
|
|
|
|
"Specification-Vendor": "ZekerZhayard",
|
|
|
|
"Specification-Version": "${project.version}".split("-")[0],
|
|
|
|
"Implementation-Title": "${project.name}",
|
|
|
|
"Implementation-Version": "${project.version}",
|
|
|
|
"Implementation-Vendor" :"ZekerZhayard",
|
|
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
|
|
|
"Automatic-Module-Name": "${project.group}.${project.archivesBaseName}".toString().toLowerCase(),
|
2021-07-22 10:47:28 -07:00
|
|
|
"Multi-Release": "true",
|
2021-07-22 10:14:25 -07:00
|
|
|
"GitCommit": String.valueOf(System.getenv("GITHUB_SHA"))
|
|
|
|
])
|
|
|
|
|
|
|
|
from configurations.provided.files.collect {
|
|
|
|
zipTree(it)
|
|
|
|
}
|
|
|
|
|
2021-07-22 10:47:28 -07:00
|
|
|
into "META-INF/versions/9", {
|
|
|
|
from configurations.multirelase.files.collect {
|
|
|
|
zipTree(it)
|
|
|
|
}
|
|
|
|
exclude "META-INF/**"
|
2020-02-08 20:26:14 -07:00
|
|
|
}
|
2021-07-22 10:14:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
groupId "${project.group}"
|
|
|
|
artifactId "${project.archivesBaseName}"
|
|
|
|
version "${project.version}"
|
|
|
|
|
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url = layout.buildDirectory.dir("maven")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tasks.publish.dependsOn build
|
|
|
|
|
|
|
|
static String getVersionSuffix() {
|
2022-01-01 16:05:00 -07:00
|
|
|
return ""
|
2021-07-22 10:14:25 -07:00
|
|
|
}
|