-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
100 lines (90 loc) · 3.74 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
100 lines (90 loc) · 3.74 KB
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
/*
* ____ _ _ ____ ___ ____ _ _ ____ ____ ____ ____ ___ _ _ _ ____
* | | | [__ | | | |\/| | |__/ |__| |___ | | |\ | | __
* |___ |__| ___] | |__| | | |___ | \ | | | | | | \| |__]
*
* CustomCrafting Recipe creation and management tool for Minecraft
* Copyright (C) 2021 WolfyScript
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
plugins {
`java-library`
`maven-publish`
kotlin("jvm")
alias(sharedLibs.plugins.shadow)
alias(sharedLibs.plugins.modrinth.minotaur)
alias(sharedLibs.plugins.artifactory)
}
repositories {
mavenLocal()
maven (url = "https://repo.codemc.io/repository/maven-public/")
maven(url = "https://repo.papermc.io/repository/maven-public/")
maven(url = "https://artifacts.wolfyscript.com/artifactory/gradle-dev")
maven(url = "https://repo.dmulloy2.net/repository/public/")
maven(url = "https://repo.maven.apache.org/maven2/")
maven(url = "https://mvn.lumine.io/repository/maven-public/")
maven(url = "https://repo.oraxen.com/releases")
google()
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
compileOnly(project(":core:core-spigot"))
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
artifact(file("$rootDir/gradle.properties"))
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
artifactory {
publish {
contextUrl = "https://artifacts.wolfyscript.com/artifactory"
repository {
repoKey = "gradle-dev-local"
username = System.getenv("ARTIFACTORY_USERNAME")
password = System.getenv("ARTIFACTORY_TOKEN")
}
defaults {
publications("maven")
setPublishArtifacts(true)
setPublishPom(true)
isPublishBuildInfo = false
}
}
}
// build.gradle.kts
modrinth {
token.set(System.getenv("MODRINTH_TOKEN")) // Remember to have the MODRINTH_TOKEN environment variable set or else this will fail - just make sure it stays private!
projectId.set("customcrafting") // This can be the project ID or the slug. Either will work!
versionNumber.set(project.version.toString()) // You don't need to set this manually. Will fail if Modrinth has this version already
versionType.set("release") // TODO: Automatically determine this from the version
uploadFile.set(tasks.shadowJar) // Use the shadowed jar !!
changelog.set(System.getenv("CHANGELOG"))
gameVersions.addAll(sharedLibs.versions.minecraft.get()) // Must be an array, even with only one version
loaders.addAll("bukkit", "spigot", "paper", "purpur") // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
dependencies { // A special DSL for creating dependencies
// scope.type
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
// The type can either be `project` or `version`
required.project("wolfyutils")
required.project("nbtapi")
}
}