forked from AnvilloyDevStudio/MiniMods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
120 lines (101 loc) · 3.39 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
plugins {
id 'java'
id 'java-library'
id 'application'
id "com.github.johnrengelman.shadow" version "7.1.2"
}
project.version = '1.0.0' // Based off MiniMods 0.4.0
sourceCompatibility = 8
mainClassName = 'onedsix.loader.core.LoaderInitialization'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/main/java/" ]
sourceSets.main.resources.srcDirs = ["src/main/resources/", "../assets/"]
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://jitpack.io" }
maven { url "https://nexus.velocitypowered.com/repository/maven-public/" }
maven { url 'https://maven.minecraftforge.net/' }
}
dependencies {
// Pull from onedsix temporarily
//implementation 'com.github.OneDSix:onedsix:main-SNAPSHOT'
// Main Loader dependencies.
implementation "org.spongepowered:mixin:0.8.5"
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
implementation "net.java.dev.jna:jna:5.12.1"
implementation "net.java.dev.jna:jna-platform:5.12.1"
implementation "com.github.oshi:oshi-core:6.2.2"
api "com.electronwill.night-config:toml:3.6.0"
runtimeOnly 'net.minecraftforge:accesstransformers:8.0.4'
implementation 'org.apache.maven:maven-artifact:3.8.1'
compileOnly "org.jetbrains:annotations:23.0.0"
// JSON & TOML
api 'org.json:json:20210307' // TODO: move from org.json:json to google:gson
implementation "com.google.code.gson:gson:2.10.1"
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
// Utilities
implementation 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
// Logging
implementation "org.slf4j:slf4j-api:1.7.32"
implementation "ch.qos.logback:logback-classic:1.2.6"
// Dependencies of SpongePowered:Mixin.
api "org.ow2.asm:asm:9.3"
api "org.ow2.asm:asm-tree:9.3"
api "org.ow2.asm:asm-util:9.3"
api "org.ow2.asm:asm-commons:9.3"
api 'com.google.guava:guava:31.1-jre'
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
}
jar {
delete(file("build/distributable"))
file("build/distributable/lib").mkdirs()
def paths = [];
configurations.runtimeClasspath.each { dir ->
def des = "lib/"
paths.add(des + dir.getName())
copy {
from dir
into "build/distributable/" + des
}
}
archivesBaseName = "MiniSponge"
archiveClassifier.set('')
manifest {
attributes(
'Main-Class': mainClassName,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'SplashScreen-Image': "Minicraft_Splash_Screen_3.png",
'Class-Path': String.join(" ", paths) // Adding class paths
)
}
}
shadowJar {
distTar.enabled = false
distZip.enabled = false
shadowDistTar.enabled = false
shadowDistZip.enabled = false
archivesBaseName = "MiniSponge"
manifest {
attributes(
'Main-Class': mainClassName,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'SplashScreen-Image': "Minicraft_Splash_Screen_3.png",
)
}
}