Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

Commit b5652eb

Browse files
author
AngrySoundTech
committed
Initial CivGradle2
1 parent bbe4f32 commit b5652eb

File tree

5 files changed

+32
-66
lines changed

5 files changed

+32
-66
lines changed

build.gradle.kts

+16-42
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,33 @@
1-
import net.civmc.civgradle.common.util.civRepo
1+
import net.civmc.civgradle.CivGradleExtension
22

33
plugins {
4-
`java-library`
5-
`maven-publish`
6-
id("net.civmc.civgradle.plugin") version "1.0.0-SNAPSHOT"
7-
}
8-
9-
// Temporary hack:
10-
// Remove the root build directory
11-
gradle.buildFinished {
12-
project.buildDir.deleteRecursively()
13-
}
14-
15-
allprojects {
16-
group = "net.civmc.citadel"
17-
version = "5.0.0-SNAPSHOT"
18-
description = "Citadel"
4+
id("net.civmc.civgradle") version "2.+" apply false
195
}
206

217
subprojects {
22-
apply(plugin = "net.civmc.civgradle.plugin")
238
apply(plugin = "java-library")
249
apply(plugin = "maven-publish")
10+
apply(plugin = "net.civmc.civgradle")
2511

26-
java {
27-
toolchain {
28-
languageVersion.set(JavaLanguageVersion.of(17))
29-
}
12+
configure<CivGradleExtension> {
13+
pluginName = project.property("pluginName") as String
3014
}
3115

3216
repositories {
3317
mavenCentral()
34-
35-
maven("https://papermc.io/repo/repository/maven-public/")
18+
maven("https://repo.civmc.net/repository/maven-public")
19+
maven("https://repo.aikar.co/content/groups/aikar/")
20+
maven("https://libraries.minecraft.net")
3621
maven("https://repo.codemc.io/repository/maven-public/")
37-
38-
civRepo("CivMC/CivModCore")
39-
civRepo("CivMC/NameLayer")
40-
}
41-
42-
publishing {
43-
repositories {
44-
maven {
45-
name = "GitHubPackages"
46-
url = uri("https://maven.pkg.github.com/CivMC/Citadel")
47-
credentials {
48-
username = System.getenv("GITHUB_ACTOR")
49-
password = System.getenv("GITHUB_TOKEN")
50-
}
51-
}
52-
}
53-
publications {
54-
register<MavenPublication>("gpr") {
55-
from(components["java"])
22+
maven {
23+
name = "GitHubPackages"
24+
url = uri("https://maven.pkg.github.com/CivMC/NameLayer")
25+
credentials {
26+
username = System.getenv("GITHUB_ACTOR")
27+
password = System.getenv("GITHUB_TOKEN")
5628
}
5729
}
30+
31+
maven("https://jitpack.io")
5832
}
5933
}

gradle.properties

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Gradle properties
2+
group = net.civmc.citadel
3+
version = 2.0.0-SNAPSHOT
4+
description = Citadel
5+
6+
# Custom Properties
7+
pluginName = Citadel

paper/build.gradle.kts

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
plugins {
2-
`java-library`
3-
id("net.civmc.civgradle.plugin")
4-
id("io.papermc.paperweight.userdev") version "1.3.1"
5-
}
6-
7-
civGradle {
8-
paper {
9-
pluginName = "Citadel"
10-
}
2+
id("net.civmc.civgradle")
3+
id("io.papermc.paperweight.userdev")
114
}
125

136
dependencies {

paper/src/main/java/vg/civcraft/mc/citadel/command/AreaReinforce.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
package vg.civcraft.mc.citadel.command;
22

33
import co.aikar.commands.BaseCommand;
4-
import co.aikar.commands.annotation.CommandAlias;
5-
import co.aikar.commands.annotation.CommandCompletion;
6-
import co.aikar.commands.annotation.Description;
7-
import co.aikar.commands.annotation.Optional;
8-
import co.aikar.commands.annotation.Syntax;
4+
import co.aikar.commands.annotation.*;
95
import java.util.UUID;
106
import org.bukkit.ChatColor;
117
import org.bukkit.block.Block;
@@ -25,6 +21,7 @@ public class AreaReinforce extends BaseCommand {
2521
@Syntax("<group> <lowX> <lowY> <lowZ> <highX> <highY> <highZ>")
2622
@Description("Using the reinforcement item in your main hand, reinforces an area to your default or a target group.")
2723
@CommandCompletion("@CT_Groups @nothing @nothing @nothing @nothing @nothing @nothing")
24+
@CommandPermission("citadel.admin")
2825
public void execute(Player p, @Optional String targetGroup, String minX, String minY, String minZ, String maxX, String maxY, String maxZ) {
2926
UUID uuid = NameAPI.getUUID(p.getName());
3027
ReinforcementType reinType = Citadel.getInstance().getReinforcementTypeManager()

settings.gradle.kts

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
rootProject.name = "citadel"
2-
31
pluginManagement {
42
repositories {
53
gradlePluginPortal()
4+
maven("https://repo.civmc.net/repository/maven-public/")
65
maven("https://papermc.io/repo/repository/maven-public/")
7-
maven {
8-
url = uri("https://maven.pkg.github.com/CivMC/CivGradle")
9-
credentials {
10-
username = System.getenv("GITHUB_ACTOR")
11-
password = System.getenv("GITHUB_TOKEN")
12-
}
13-
}
14-
}
6+
}
157
}
168

9+
rootProject.name = "citadel"
10+
1711
include(":paper")
12+
project(":paper").name = rootProject.name + "-paper"

0 commit comments

Comments
 (0)