-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
122 lines (95 loc) · 2.54 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
121
122
/*
* Created on Sun Aug 08 2021
*
* Copyright (c) storycraft. Licensed under the MIT Licence.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
group 'sh.pancake'
version '0.5.0'
java.toolchain.languageVersion = JavaLanguageVersion.of(11)
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
}
repositories {
mavenCentral()
maven {
name = 'Sponge'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = 'Mojang'
url = 'https://libraries.minecraft.net'
}
maven {
name = 'StoryNetwork'
url = 'https://raw.githubusercontent.com/story-network/maven/master/'
}
}
dependencies {
implementation 'sh.pancake:pancake-sauce:0.3.0'
api 'sh.pancake:story-network-launch-util:0.1.0'
implementation 'info.picocli:picocli:4.6.1'
api 'org.apache.logging.log4j:log4j-core:2.8.1'
api 'org.apache.logging.log4j:log4j-api:2.8.1'
implementation 'org.fusesource.jansi:jansi:1.18'
api 'com.google.code.findbugs:jsr305:3.0.2'
// Mixin modding
api('org.spongepowered:mixin:0.8.4-SNAPSHOT') {
exclude module: 'launchwrapper'
exclude module: 'modlauncher'
exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
}
api 'org.ow2.asm:asm:9.2'
api 'org.ow2.asm:asm-analysis:9.2'
api 'org.ow2.asm:asm-commons:9.2'
api 'org.ow2.asm:asm-tree:9.2'
api 'org.ow2.asm:asm-util:9.2'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
tasks.named('test') {
useJUnitPlatform()
}
java {
withSourcesJar()
}
sourceSets {
main {
java {
srcDir 'src/java'
}
resources {
srcDir 'src/resources'
}
}
}
jar {
manifest {
attributes 'Created-From': System.properties['java.vm.version'] + ' (' + System.properties['java.vm.vendor'] + ')'
attributes 'Main-Class': 'sh.pancake.launcher.main.Launcher'
}
}
shadowJar {
manifest {
inheritFrom project.tasks.jar.manifest
}
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer)
}
tasks.build.dependsOn shadowJar
publishing {
repositories {
maven {
name = 'StoryNetwork'
url = uri('../maven')
}
}
publications {
maven(MavenPublication) {
from components.java
}
}
}