-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
99 lines (84 loc) · 2.85 KB
/
build.gradle.kts
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
@file:Suppress("UnstableApiUsage")
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
`java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
id("me.modmuss50.mod-publish-plugin") version "0.6.3" apply false
id("systems.manifold.manifold-gradle-plugin") version "0.0.2-alpha" apply false
}
group = "toni.blahaj"
version = "2.0.0"
// Repositories for dependencies
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://maven.fabricmc.net/")
maven("https://maven.architectury.dev")
maven("https://maven.minecraftforge.net")
maven("https://maven.neoforged.net/releases/")
maven("https://maven.kikugie.dev/snapshots")
maven("https://maven.kikugie.dev/releases")
maven("https://raw.githubusercontent.com/Fuzss/modresources/main/maven/")
maven("https://maven.txni.dev/releases")
maven("https://maven.su5ed.dev/releases")
maven("https://maven.shedaniel.me/")
maven("https://www.cursemaven.com")
maven("https://api.modrinth.com/maven")
maven("https://thedarkcolour.github.io/KotlinForForge/")
maven("https://libraries.minecraft.net")
}
// Dependencies
dependencies {
implementation("me.modmuss50:mod-publish-plugin:0.6.3")
implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.9-SNAPSHOT") {
exclude("com.mojang")
}
implementation("systems.manifold:manifold-gradle-plugin:0.0.2-alpha")
implementation("dev.kikugie:stonecutter:0.6-alpha.5")
}
gradlePlugin {
website = "https://template.txni.dev/"
vcsUrl = "https://github.com/txni/Blahaj"
plugins {
create("blahaj") {
id = "toni.blahaj"
implementationClass = "toni.blahaj.BlahajPlugin"
displayName = "Blahaj"
description = "Minecraft multiversion plugin, with full mod project management, built on Stonecutter"
tags = setOf("minecraft", "mods")
}
}
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
tasks.compileKotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_16)
}
}
// Publishing configuration
publishing {
publications {
register("mavenJava", MavenPublication::class) {
groupId = project.group.toString()
artifactId = "blahaj"
version = project.version.toString()
from(components["java"])
}
}
repositories {
maven {
url = uri("https://maven.txni.dev/releases")
credentials {
// Ensure credentials are correctly fetched and not null
username = findProperty("MAVEN_USERNAME") as String? ?: System.getenv("MAVEN_USERNAME")
password = findProperty("MAVEN_PASSWORD") as String? ?: System.getenv("MAVEN_PASSWORD")
}
}
}
}