First working commit
This commit is contained in:
109
build.gradle
Normal file
109
build.gradle
Normal file
@@ -0,0 +1,109 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'idea'
|
||||
id 'java-gradle-plugin'
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
id 'com.gradle.plugin-publish' version '1.2.1'
|
||||
id "com.diffplug.spotless" version "6.13.0"
|
||||
}
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
group = 'com.hypherionmc.modutils'
|
||||
version = "${version_base}.${version_patch}"
|
||||
description = "Gradle plugin to merge multiloader/architectury multiplatform mods into a single jar file"
|
||||
archivesBaseName = 'ModFusioner'
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
if (System.getenv('BUILD_NUMBER') != null) {
|
||||
version = "${version_base}." + System.getenv('BUILD_NUMBER')
|
||||
}
|
||||
|
||||
configurations {
|
||||
shadeMe
|
||||
implementation.extendsFrom shadeMe
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://maven.firstdarkdev.xyz/releases"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation gradleApi()
|
||||
|
||||
// Shaded Deps
|
||||
shadeMe 'org.jetbrains:annotations:24.0.1'
|
||||
shadeMe 'commons-io:commons-io:2.11.0'
|
||||
|
||||
shadeMe('me.lucko:jar-relocator:1.5') {
|
||||
exclude group: 'org.ow2.asm'
|
||||
}
|
||||
shadeMe 'org.ow2.asm:asm:9.3'
|
||||
shadeMe 'org.ow2.asm:asm-commons:9.3'
|
||||
shadeMe "fr.stevecohen.jarmanager:JarManager:0.5.0"
|
||||
shadeMe 'org.apache.commons:commons-compress:1.24.0'
|
||||
shadeMe 'org.apache.tika:tika-core:1.28'
|
||||
|
||||
compileOnly 'org.projectlombok:lombok:1.18.30'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.30'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
configurations = [project.configurations.getByName("shadeMe")]
|
||||
archiveClassifier.set(null)
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
modPublisherPlugin {
|
||||
id = 'com.hypherionmc.modutils.modfusioner'
|
||||
description = project.description
|
||||
displayName = 'ModFusioner'
|
||||
version = project.version
|
||||
implementationClass = "com.hypherionmc.modfusioner.plugin.ModFusionerPlugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pluginBundle {
|
||||
website = 'https://github.com/firstdarkdev/modfusioner'
|
||||
vcsUrl = 'https://github.com/firstdarkdev/modfusioner'
|
||||
description = 'Gradle plugin to merge multiloader/architectury multiplatform mods into a single jar file'
|
||||
tags = ['minecraft', 'forge', 'fabric', 'quilt', 'merge', 'mod']
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
'Timestamp' : System.currentTimeMillis(),
|
||||
'Specification-Title' : project.archivesBaseName,
|
||||
'Specification-Version' : project.version,
|
||||
'Implementation-Title' : project.archivesBaseName,
|
||||
'Implementation-Version' : project.version,
|
||||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})"
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
targetExclude("src/test/**")
|
||||
licenseHeaderFile(rootProject.file("HEADER")).yearSeparator("-")
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
url System.getenv('MAVEN_URL')
|
||||
credentials {
|
||||
username System.getenv('MAVEN_USER')
|
||||
password System.getenv('MAVEN_PASS')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user