-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
88 lines (72 loc) · 2.55 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
plugins {
id 'java'
id 'java-gradle-plugin'
id 'com.github.johnrengelman.shadow' version '8.0.0'
id 'maven-publish'
id 'com.gradle.plugin-publish' version '0.21.0'
}
group 'io.github.pacifistmc.forgix'
// Make sure to change the version number in io.github.pacifistmc.forgix.Forgix
def constantsSource = rootProject.file("src/main/java/io/github/pacifistmc/forgix/Forgix.java").text
version = (constantsSource =~ /\s+version\s*=\s*"(.*)";/)[0][1]
configurations {
shadowMe
compileOnly.extendsFrom shadowMe
}
repositories {
mavenCentral()
maven {
name = 'FirstDarkDev'
url = 'https://maven.firstdarkdev.xyz/releases/'
}
}
dependencies {
implementation gradleApi()
shadowMe 'commons-io:commons-io:2.16.1'
// Magic
shadowMe('me.lucko:jar-relocator:1.7') {
exclude group: 'org.ow2.asm'
}
shadowMe 'org.ow2.asm:asm:9.7'
shadowMe 'org.ow2.asm:asm-commons:9.7'
shadowMe 'net.lingala.zip4j:zip4j:2.11.5'
shadowMe 'fr.stevecohen.jarmanager:JarManager:0.5.0' // https://bitbucket.org/ReaperSoon/maven-repo/src/367c0bcb2749/fr/stevecohen/jarmanager
}
shadowJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations = [project.configurations.getByName("shadowMe")]
archiveClassifier.set(null)
relocate "me.lucko.jarrelocator", "pacifistmc.libraries.me.lucko.jarrelocator"
relocate "fr.stevecohen.jarmanager", "pacifistmc.libraries.fr.stevecohen.jarmanager"
relocate "org.objectweb.asm", "pacifistmc.libraries.org.objectweb.asm"
relocate "org.apache.commons.io", "pacifistmc.libraries.org.apache.commons.io"
relocate "net.lingala.zip4j", "pacifistmc.libraries.net.lingala.zip4j"
}
gradlePlugin {
plugins {
Forgix {
id = "io.github.pacifistmc.forgix"
displayName = 'Forgix'
description = 'This plugin merges Fabric (also Quilt) & Forge jars into a single jar.'
implementationClass = "io.github.pacifistmc.forgix.plugin.ForgixPlugin"
}
}
}
pluginBundle {
website = 'https://github.com/PacifistMC'
vcsUrl = 'https://github.com/PacifistMC/Forgix'
tags = ['forge', 'minecraftforge', 'merge', 'jars', 'fabric', 'fabricmc', 'quilt', 'quiltmc', 'neoforge', 'neoforged', 'minecraft', 'architectury', 'forgix', 'pacifistmc']
}
publishing {
repositories {
maven {
name = 'localPluginRepository'
url = '../local-plugin-repository'
}
}
}
tasks.withType(JavaCompile) {
sourceCompatibility = 8
options.release = 8
}
jar.finalizedBy(shadowJar)