diff --git a/build.gradle b/build.gradle index 3de7d0b..92b8567 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ def artifactId = 'GradleBasePlugin' // /---> Major Version - Increment this when you make a breaking change // | /---> Minor Version - Increment this when you add a new feature // | | /---> Patch Version - Increment this when you make a bug fix -def versionNum = '5.0.3' +def versionNum = '5.0.4' group = groupId version = versionNum diff --git a/src/main/java/com/techscode/GradeBasePlugin/Color.java b/src/main/java/me/TechsCode/GradleBasePlugin/Color.java similarity index 98% rename from src/main/java/com/techscode/GradeBasePlugin/Color.java rename to src/main/java/me/TechsCode/GradleBasePlugin/Color.java index ef4d980..b7bc60f 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/Color.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/Color.java @@ -1,4 +1,4 @@ -package com.techscode.GradeBasePlugin; +package me.TechsCode.GradleBasePlugin; public enum Color { diff --git a/src/main/java/com/techscode/GradeBasePlugin/GradleBasePlugin.java b/src/main/java/me/TechsCode/GradleBasePlugin/GradleBasePlugin.java similarity index 91% rename from src/main/java/com/techscode/GradeBasePlugin/GradleBasePlugin.java rename to src/main/java/me/TechsCode/GradleBasePlugin/GradleBasePlugin.java index a5d1b10..73c7bea 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/GradleBasePlugin.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/GradleBasePlugin.java @@ -1,18 +1,18 @@ -package com.techscode.GradeBasePlugin; +package me.TechsCode.GradleBasePlugin; import java.io.File; import java.io.IOException; import java.util.Arrays; -import com.techscode.GradeBasePlugin.resource.ResourceResponse; +import me.TechsCode.GradleBasePlugin.extensions.MetaExtension; +import me.TechsCode.GradleBasePlugin.resource.ResourceManager; +import me.TechsCode.GradleBasePlugin.resource.ResourceResponse; import org.gradle.api.Plugin; import org.gradle.api.Project; import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar; -import com.techscode.GradeBasePlugin.extensions.MetaExtension; -import com.techscode.GradeBasePlugin.resource.ResourceManager; -import com.techscode.GradeBasePlugin.tasks.GenerateMetaFilesTask; +import me.TechsCode.GradleBasePlugin.tasks.GenerateMetaFilesTask; public class GradleBasePlugin implements Plugin { @@ -30,9 +30,9 @@ public class GradleBasePlugin implements Plugin { }; private static final String[] relocations = new String[] { - "com.techscode.base#com.techscode.PROJECT_NAME.base", - "com.techscode.tpl#com.techscode.PROJECT_NAME.tpl", - "com.techscode.dependencies#com.techscode.PROJECT_NAME.dependencies" + "com.techscode.base#me.TechsCode.PROJECT_NAME.base", + "com.techscode.tpl#me.TechsCode.PROJECT_NAME.tpl", + "com.techscode.dependencies#me.TechsCode.PROJECT_NAME.dependencies" }; private MetaExtension meta; @@ -41,8 +41,8 @@ public class GradleBasePlugin implements Plugin { @Override public void apply(Project project) { - Logger.info( - Color.BLUE_BOLD_BRIGHT + "Applying GradleBasePlugin to " + project.getName() + "...", + me.TechsCode.GradleBasePlugin.Logger.info( + me.TechsCode.GradleBasePlugin.Color.BLUE_BOLD_BRIGHT + "Applying GradleBasePlugin to " + project.getName() + "...", "", "Project Information:" ); diff --git a/src/main/java/com/techscode/GradeBasePlugin/Logger.java b/src/main/java/me/TechsCode/GradleBasePlugin/Logger.java similarity index 97% rename from src/main/java/com/techscode/GradeBasePlugin/Logger.java rename to src/main/java/me/TechsCode/GradleBasePlugin/Logger.java index 1e68df6..6f88540 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/Logger.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/Logger.java @@ -1,4 +1,4 @@ -package com.techscode.GradeBasePlugin; +package me.TechsCode.GradleBasePlugin; /** * Logging util making it easier to log messages to the console diff --git a/src/main/java/com/techscode/GradeBasePlugin/extensions/Downloader.java b/src/main/java/me/TechsCode/GradleBasePlugin/extensions/Downloader.java similarity index 97% rename from src/main/java/com/techscode/GradeBasePlugin/extensions/Downloader.java rename to src/main/java/me/TechsCode/GradleBasePlugin/extensions/Downloader.java index 2983d31..7fc4dde 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/extensions/Downloader.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/extensions/Downloader.java @@ -1,4 +1,4 @@ -package com.techscode.GradeBasePlugin.extensions; +package me.TechsCode.GradleBasePlugin.extensions; import java.io.File; import java.io.IOException; diff --git a/src/main/java/com/techscode/GradeBasePlugin/extensions/MetaExtension.java b/src/main/java/me/TechsCode/GradleBasePlugin/extensions/MetaExtension.java similarity index 96% rename from src/main/java/com/techscode/GradeBasePlugin/extensions/MetaExtension.java rename to src/main/java/me/TechsCode/GradleBasePlugin/extensions/MetaExtension.java index 638f04b..4faa515 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/extensions/MetaExtension.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/extensions/MetaExtension.java @@ -1,8 +1,8 @@ -package com.techscode.GradeBasePlugin.extensions; +package me.TechsCode.GradleBasePlugin.extensions; import java.util.ArrayList; -import com.techscode.GradeBasePlugin.Logger; +import me.TechsCode.GradleBasePlugin.Logger; public class MetaExtension { diff --git a/src/main/java/com/techscode/GradeBasePlugin/resource/ResourceManager.java b/src/main/java/me/TechsCode/GradleBasePlugin/resource/ResourceManager.java similarity index 92% rename from src/main/java/com/techscode/GradeBasePlugin/resource/ResourceManager.java rename to src/main/java/me/TechsCode/GradleBasePlugin/resource/ResourceManager.java index 3e05d42..282e21b 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/resource/ResourceManager.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/resource/ResourceManager.java @@ -1,4 +1,4 @@ -package com.techscode.GradeBasePlugin.resource; +package me.TechsCode.GradleBasePlugin.resource; import java.io.File; import java.io.IOException; @@ -8,10 +8,10 @@ import java.nio.file.Paths; import java.nio.file.StandardCopyOption; -import com.techscode.GradeBasePlugin.Color; -import com.techscode.GradeBasePlugin.Logger; -import com.techscode.GradeBasePlugin.extensions.Downloader; -import com.techscode.GradeBasePlugin.extensions.MetaExtension; +import me.TechsCode.GradleBasePlugin.Color; +import me.TechsCode.GradleBasePlugin.Logger; +import me.TechsCode.GradleBasePlugin.extensions.Downloader; +import me.TechsCode.GradleBasePlugin.extensions.MetaExtension; import org.gradle.api.Project; public class ResourceManager { diff --git a/src/main/java/com/techscode/GradeBasePlugin/resource/ResourceResponse.java b/src/main/java/me/TechsCode/GradleBasePlugin/resource/ResourceResponse.java similarity index 70% rename from src/main/java/com/techscode/GradeBasePlugin/resource/ResourceResponse.java rename to src/main/java/me/TechsCode/GradleBasePlugin/resource/ResourceResponse.java index 988080d..621b42b 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/resource/ResourceResponse.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/resource/ResourceResponse.java @@ -1,4 +1,4 @@ -package com.techscode.GradeBasePlugin.resource; +package me.TechsCode.GradleBasePlugin.resource; public enum ResourceResponse { diff --git a/src/main/java/com/techscode/GradeBasePlugin/tasks/GenerateMetaFilesTask.java b/src/main/java/me/TechsCode/GradleBasePlugin/tasks/GenerateMetaFilesTask.java similarity index 85% rename from src/main/java/com/techscode/GradeBasePlugin/tasks/GenerateMetaFilesTask.java rename to src/main/java/me/TechsCode/GradleBasePlugin/tasks/GenerateMetaFilesTask.java index 2c351ba..5a5652f 100644 --- a/src/main/java/com/techscode/GradeBasePlugin/tasks/GenerateMetaFilesTask.java +++ b/src/main/java/me/TechsCode/GradleBasePlugin/tasks/GenerateMetaFilesTask.java @@ -1,13 +1,13 @@ -package com.techscode.GradeBasePlugin.tasks; +package me.TechsCode.GradleBasePlugin.tasks; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; -import com.techscode.GradeBasePlugin.Color; -import com.techscode.GradeBasePlugin.Logger; -import com.techscode.GradeBasePlugin.extensions.MetaExtension; +import me.TechsCode.GradleBasePlugin.Color; +import me.TechsCode.GradleBasePlugin.Logger; +import me.TechsCode.GradleBasePlugin.extensions.MetaExtension; import org.gradle.api.DefaultTask; import org.gradle.api.tasks.TaskAction; @@ -42,7 +42,7 @@ private void createPluginYml(File resourcesFolder, String projectName, String pr writer.println("author: Tech"); writer.println("website: " + projectName + ".com"); writer.println("build: " + buildNumber); - writer.println("main: com.techscode." + getProject().getName() + ".base.loader.SpigotLoader"); + writer.println("main: me.TechsCode." + getProject().getName() + ".base.loader.SpigotLoader"); writer.println("api-version: 1.13"); if (loadAfter != null) { @@ -57,6 +57,8 @@ private void createPluginYml(File resourcesFolder, String projectName, String pr if (libraries != null) { writer.println("libraries:"); libraries.stream().map(library -> "- " + library).forEach(writer::println); + } else { + writer.println("libraries: []"); } writer.close(); } @@ -70,12 +72,14 @@ private void createBungeeYml(File resourcesFolder, String projectName, String pr writer.println("name: " + projectName); writer.println("version: " + projectVersion); writer.println("build: " + buildNumber); - writer.println("main: com.techscode." + getProject().getName() + ".base.loader.BungeeLoader"); + writer.println("main: me.TechsCode." + getProject().getName() + ".base.loader.BungeeLoader"); writer.println("author: Tech"); if (libraries != null) { writer.println("libraries:"); libraries.stream().map(library -> "- " + library).forEach(writer::println); + } else { + writer.println("libraries: []"); } writer.close(); } diff --git a/src/main/resources/META-INF/gradle-plugins/me.TechsCode.GradleBasePlugin.properties b/src/main/resources/META-INF/gradle-plugins/me.TechsCode.GradleBasePlugin.properties index 6833738..a372573 100644 --- a/src/main/resources/META-INF/gradle-plugins/me.TechsCode.GradleBasePlugin.properties +++ b/src/main/resources/META-INF/gradle-plugins/me.TechsCode.GradleBasePlugin.properties @@ -1 +1 @@ -implementation-class=com.techscode.GradeBasePlugin.GradleBasePlugin \ No newline at end of file +implementation-class=me.TechsCode.GradleBasePlugin.GradleBasePlugin \ No newline at end of file