This repository has been archived by the owner on Dec 6, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (107 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
121
122
123
124
125
126
/*
* Crimson - The ultimate Minecraft library mod
* Copyright (C) 2021 Qalcyo
*
* Crimson is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* Crimson is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Crimson. If not, see <https://www.gnu.org/licenses/>.
*/
plugins {
id "com.github.johnrengelman.shadow" version "6.1.0"
id "com.github.gmazzo.buildconfig" version "3.0.1"
id "org.jetbrains.kotlin.jvm" version "1.5.31"
id "maven-publish"
id "java"
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
allprojects {
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "com.github.gmazzo.buildconfig"
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: "maven-publish"
apply plugin: "java"
group = project_group
configurations {
compile
api.extendsFrom(compile)
shade
implementation.extendsFrom(shade)
}
repositories {
mavenCentral()
maven {
url = "http://maven.deftu.xyz/repository/maven-public/"
allowInsecureProtocol = true
}
maven {
url = "https://repo.sk1er.club/repository/maven-public/"
}
maven {
url = "https://repo.spongepowered.org/maven/"
}
maven {
url = "https://jitpack.io/"
}
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
'LICENSE'
}
exclude 'META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'module-info.class'
}
shadowJar {
archiveClassifier.set('')
configurations = [project.configurations.shade]
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude('LICENSE.md')
exclude('pack.mcmeta')
exclude('dummyThing')
exclude('**/module-info.class')
exclude('*.so')
exclude('*.dylib')
exclude('*.dll')
exclude('*.jnilib')
exclude('ibxm/**')
exclude('com/jcraft/**')
exclude('org/lwjgl/**')
exclude('net/java/**')
exclude('META-INF/proguard/**')
exclude('META-INF/maven/**')
exclude('META-INF/versions/**')
exclude('META-INF/com.android.tools/**')
exclude('**/*.kotlin_metadata')
exclude('**/*.kotlin_module')
exclude('**/*.kotlin_builtins')
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "${project_name}-${project.name}"
artifact(shadowJar) {
builtBy shadowJar
}
pom {
name = "${project_name}-${project.name}"
}
}
}
}
jar.finalizedBy(shadowJar)
}
configure(subprojects.findAll { it.name != "core" }) {
jar.enabled = false
shadowJar {
archiveBaseName.set(project_name)
archiveVersion.set(project_version)
}
}