-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle
77 lines (64 loc) · 2.58 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
plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '6.0.+'
id 'com.github.johnrengelman.shadow' version '8.1.+'
}
apply from: 'gradle/teacon-forge.gradle'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
// definitions at gradle/teacon-forge.gradle
teacon {
modId = 'slide_show'
modVersion = '0.8.4'
modLicense = 'LGPL-3.0-only'
modGitHubRepo = 'teaconmc/SlideShow'
modAuthors = ['BloCamLimb', '3TUSK', 'ustc-zzzz']
modDescription = 'Minecraft mod, adding a projector that can display online images.'
platform = 'forge-1.20-46.0.1'
// 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 - project.configurations.minecraft).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)
}
repositories {
maven { url 'https://jitpack.io' }
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
dependencies {
shadow 'org.teacon:urlpattern:1.0.1'
shadow 'net.objecthunter:exp4j:0.4.8'
shadow 'org.apache.httpcomponents:httpclient-cache:4.5.13'
runtimeOnly fg.deobf("maven.modrinth:oculus:HxUtDCCe") // 1.20-1.6.4
}
shadowJar {
archiveClassifier.set(null)
configurations = [project.configurations.shadow]
from(file('LICENSE')) { into 'META-INF' rename { "$it-slide-show" } }
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:.*')
it.exclude it.dependency('org.slf4j:slf4j-api:.*')
}
relocate 'net.objecthunter.exp4j', 'org.teacon.slides.exp4j'
relocate 'org.teacon.urlpattern', 'org.teacon.slides.urlpattern'
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 }
}