Skip to content

Commit

Permalink
Update gradle version and to use kotlin
Browse files Browse the repository at this point in the history
Some other changes has be made too, as for some temporal fixes.
  • Loading branch information
Elguerrero11 committed Apr 9, 2023
1 parent 9053369 commit 2cc7229
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 61 deletions.
42 changes: 0 additions & 42 deletions build.gradle

This file was deleted.

73 changes: 73 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
java
`maven-publish`
}

group = "com.elguerrero.stellarminigameframework"
version = "0.0.4"
description = "A framework for create spigot/paper minigames."

repositories {
mavenCentral()
maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") } // V
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } //
maven { url = uri("https://oss.sonatype.org/content/repositories/central") }
maven { url = uri("https://repo.papermc.io/repository/maven-public/") }
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://repo.codemc.org/repository/maven-public/") }
}

dependencies {

annotationProcessor("org.projectlombok:lombok:1.18.26")

compileOnly("org.projectlombok:lombok:1.18.26")
compileOnly("org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")

implementation("dev.dejvokep:boosted-yaml:1.3.1")
implementation("dev.jorel:commandapi-shade:8.8.0")
implementation("com.github.Elguerrero11:Stellar-Framework:1.9.1")
}

tasks {
shadowJar.configure {
mapOf(
"dev.dejvokep.boostedyaml" to "boosted-yaml",
"dev.jorel.commandapi" to "command-api",
"com.elguerrero.stellarframework" to "stellar-framework",
"org.jetbrains.annotations" to "jetbrains-annotations",
).forEach { (packageName, newName) ->
relocate(packageName, "libs.$newName")
}

archiveClassifier.set("")
minimize()

}
build {
dependsOn(shadowJar)
}
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
mavenLocal()
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 0 additions & 2 deletions settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "StellarMinigameFramework"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.elguerrero.stellarminigameframework;

import com.elguerrero.stellarframework.StellarPlugin;
import com.elguerrero.stellarframework.config.StellarConfig;
import com.elguerrero.stellarframework.utils.StellarUtils;
import com.elguerrero.stellarminigameframework.config.StellarMinigameConfig;
import com.elguerrero.stellarminigameframework.config.StellarMinigameMessages;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.elguerrero.stellarminigameframework;

import com.elguerrero.stellarframework.utils.StellarUtils;
import com.elguerrero.stellarminigameframework.ArenaStructure;
import com.elguerrero.stellarminigameframework.StellarArena;
import com.elguerrero.stellarminigameframework.config.StellarMinigameConfig;
import com.elguerrero.stellarminigameframework.config.StellarMinigameMessages;
import jdk.nashorn.internal.ir.IfNode;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import com.elguerrero.stellarframework.StellarPlugin;
import com.elguerrero.stellarframework.utils.StellarUtils;
import com.elguerrero.stellarminigameframework.StellarArena;
import dev.jorel.commandapi.CommandAPICommand;
import jdk.nashorn.internal.ir.IfNode;
import org.bukkit.entity.Player;

public class StellarMinigameForceStartArena {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import com.elguerrero.stellarframework.config.StellarConfigManager;
import lombok.Getter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class StellarMinigameConfig extends StellarConfig implements StellarConfigManager {

@Getter
Expand Down Expand Up @@ -41,6 +36,8 @@ public class StellarMinigameConfig extends StellarConfig implements StellarConfi
public void loadStellarPluginConfigVariables() {


// Temp notes, to fix later when change the stellar framework
/*
COUNTDOWN_SECONDS = StellarConfig.getCONFIG_FILE().getInt("Countdown");
WAITING_LOBBY = StellarConfig.getCONFIG_FILE().getBoolean("Waiting_Lobby");
COUNTDOWN_TITLE_MESSAGE_ENABLED = StellarConfig.getCONFIG_FILE().getBoolean("Countdown_Title_Message_Enabled");
Expand All @@ -49,7 +46,7 @@ public void loadStellarPluginConfigVariables() {
COUNTDOWN_CHAT_MESSAGE_ENABLED = StellarConfig.getCONFIG_FILE().getBoolean("Countdown_Chat_Message_Enabled");
SEND_COUNTDOWN_MESSAGE_IN_ALL_NUMBERS = StellarConfig.getCONFIG_FILE().getBoolean("Send_Countdown_Message_In_All_Numbers");
COUNTDOWN_NUMBER_TYPE = StellarConfig.getCONFIG_FILE().getInt("Countdown_Number_Type");

*/

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public abstract class StellarMinigameMessages extends StellarMessages implements
@Override
public void loadStellarPluginMessagesVariables() {

// Temp notes to fix later when I change StellarFramework
/*
ARENA_CANT_BE_DELETED = StellarLangManager.getSELECTED_LANGUAGE_FILE().getString("Arena_Cant_Be_Deleted");
ARENA_NO_IN_WAITING = StellarLangManager.getSELECTED_LANGUAGE_FILE().getString("Arena_No_In_Waiting");
PLAYER_ALREADY_IN_ARENA = StellarLangManager.getSELECTED_LANGUAGE_FILE().getString("Player_Already_In_Arena");
Expand Down Expand Up @@ -125,6 +127,8 @@ public void loadStellarPluginMessagesVariables() {
ACTIONBAR_NUMBERS_TO_SEND_COOLDOWN_MESSAGE.put(number, message);
});
*/


}

Expand Down
5 changes: 0 additions & 5 deletions src/main/resources/StellarMinigame/plugin.yml

This file was deleted.

0 comments on commit 2cc7229

Please sign in to comment.