forked from teaconmc/SlideShow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (64 loc) · 2.53 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
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://maven.parchmentmc.org' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.parchmentmc', name: 'librarian', version: '1.+'
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply from: 'gradle/teacon-forge.gradle'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
// definitions at gradle/teacon-forge.gradle
teacon {
modId = 'slideshow'
modVersion = '0.6.3'
modLicense = 'BSD-3-Clause'
modGitHubRepo = 'teaconmc/SlideShow'
modAuthors = ['BloCamLimb', '3TUSK', 'ustc-zzzz']
modDescription = 'Minecraft mod, adding a projector that can display online images.'
platform = 'forge-1.18.2-40.1.0'
parchment = '2022.03.13'
// uncomment these lines if you need
modName = 'Slide Show' // default to repo name
// modGitHubBranch = 1.18-forge // for referring the license
// modifyMemberAccess = true // for access transformer
// useDataGeneration = true // for data generation
publishTask = shadowJar // for shadow jar or other usages
lazyTokens = ['minecraft_classpath': { project.configurations.shadow.asPath }] // for runtime tokens
// use './gradlew -q printModMeta > src/main/resources/META-INF/mods.toml' to generate mod meta
}
configurations {
compileClasspath.extendsFrom(shadow)
runtimeClasspath.extendsFrom(shadow)
}
dependencies {
shadow 'net.objecthunter:exp4j:0.4.8'
shadow 'org.apache.httpcomponents:httpclient-cache:4.5.13'
}
shadowJar {
archiveClassifier.set(null)
configurations = [project.configurations.shadow]
dependencies {
it.exclude it.dependency('org.apache.httpcomponents:httpclient:.*')
it.exclude it.dependency('org.apache.httpcomponents:httpcore:.*')
it.exclude it.dependency('commons-logging:commons-logging:.*')
it.exclude it.dependency('commons-codec:commons-codec:.*')
}
relocate 'net.objecthunter.exp4j', 'org.teacon.slides.exp4j'
relocate 'org.apache.http.client.cache', 'org.teacon.slides.http.client.cache'
relocate 'org.apache.http.impl.client.cache', 'org.teacon.slides.http.impl.client.cache'
}
jar { it.enabled false }
reobf {
jar { it.enabled false }
}