ForgeWrapper/build.gradle

96 lines
2.2 KiB
Groovy
Raw Permalink Normal View History

plugins {
id "java"
id "eclipse"
id "maven-publish"
}
2019-12-27 12:23:07 -07:00
sourceCompatibility = targetCompatibility = 1.8
compileJava {
sourceCompatibility = targetCompatibility = 1.8
}
2019-12-27 12:23:07 -07:00
version = "${fw_version}${-> getVersionSuffix()}"
2019-12-27 12:23:07 -07:00
group = "io.github.zekerzhayard"
archivesBaseName = rootProject.name
configurations {
provided {
2021-08-13 07:48:17 -07:00
implementation.extendsFrom provided
}
multirelase {
2021-08-13 07:48:17 -07:00
implementation.extendsFrom multirelase
}
}
2019-12-27 12:23:07 -07:00
repositories {
mavenCentral()
2019-12-27 12:23:07 -07:00
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
2019-12-27 12:23:07 -07:00
}
}
dependencies {
compileOnly "com.google.code.gson:gson:2.8.7"
compileOnly "cpw.mods:modlauncher:8.0.9"
2024-02-28 17:48:02 -07:00
compileOnly "net.minecraftforge:installer:2.2.7"
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")
multirelase project(":jigsaw")
}
java {
withSourcesJar()
2019-12-27 12:23:07 -07:00
}
jar {
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(),
"Multi-Release": "true",
"GitCommit": String.valueOf(System.getenv("GITHUB_SHA"))
])
from configurations.provided.files.collect {
zipTree(it)
}
into "META-INF/versions/9", {
from configurations.multirelase.files.collect {
zipTree(it)
}
exclude "META-INF/**"
}
}
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() {
return ""
}