diff --git a/api/build.gradle b/api/build.gradle index db321057..f127777e 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -25,4 +25,8 @@ dependencies { compileJava { dependsOn(":StreamlineCore-Singularity:jar") +} + +delombok { + dependsOn(":StreamlineCore-Singularity:jar") } \ No newline at end of file diff --git a/backend-api/build.gradle b/backend-api/build.gradle index 91850d2d..79a8a409 100644 --- a/backend-api/build.gradle +++ b/backend-api/build.gradle @@ -23,6 +23,10 @@ dependencies { compileOnly(files(FILES)) } -tasks.named("compileJava").configure { +compileJava { + dependsOn(":StreamlineCore-API:jar") +} + +delombok { dependsOn(":StreamlineCore-API:jar") } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 5bac53cb..6c032642 100644 --- a/build.gradle +++ b/build.gradle @@ -10,10 +10,9 @@ buildscript { } } -plugins { - id "java" - id "com.github.johnrengelman.shadow" version "7.1.2" - id "maven-publish" // for jitpack.io +allprojects { + version = rootProject.properties["version"] + group = rootProject.properties["group"] } subprojects { @@ -24,11 +23,8 @@ subprojects { apply from: rootDir.toString() + "/dependencies.gradle" - group = properties["group"] - version = properties["version"] - ext { - pluginMain = properties["plugin.main"] == "default" ? + pluginMain = rootProject.properties["plugin.main"] == "default" ? project.group.toString() + "." + project.name.toString().toLowerCase() + "." + project.name.toString() : properties["plugin.main"] } @@ -147,57 +143,24 @@ subprojects { shadowJar.finalizedBy(deploy) tasks.named('deploy').configure { - dependsOn 'shadowJar', 'sourcesJar', /*'javadocJar',*/ 'jar' + dependsOn 'shadowJar', 'sourcesJar', 'javadocJar', 'jar' + } + + java { + withSourcesJar() + withJavadocJar() } publishing { publications { maven(MavenPublication) { + groupId project.group + artifactId project.name + version project.version from components.java } } } - - java { - withSourcesJar() -// withJavadocJar() - } -} - -tasks.register('deploy', Copy) { - // Define the deployment directory - def deployDir = file(System.getenv("DEPLOY_DIR") ?: "$rootDir/deploy") - - // Ensure the deployment directory exists - doFirst { - println "Deploying to: $deployDir" - deployDir.mkdirs() - println "Generated JAR file: ${shadowJar.archiveFile}" - } - - // Copy the shadowJar output - from shadowJar.archiveFile - into deployDir -} - -// Ensure that the deploy task runs after the shadowJar task -shadowJar.finalizedBy(deploy) - -tasks.named('deploy').configure { - dependsOn 'shadowJar', 'sourcesJar', /*'javadocJar',*/ 'jar' -} - -publishing { - publications { - maven(MavenPublication) { - from components.java - } - } -} - -java { - withSourcesJar() -// withJavadocJar() } wrapper { diff --git a/bungee/build.gradle b/bungee/build.gradle index 356d70fd..da298260 100644 --- a/bungee/build.gradle +++ b/bungee/build.gradle @@ -16,6 +16,10 @@ dependencies { compileOnly project(path: ':StreamlineCore-Singularity') } -tasks.named("compileJava").configure { +compileJava { + dependsOn(":StreamlineCore-API:jar") +} + +delombok { dependsOn(":StreamlineCore-API:jar") } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index b5525197..43028bd5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.vfs.watch = false # Other properties name = StreamlineCore -group = com.github.streamline-essentials +group = com.github.Streamline-Essentials.StreamlineCore version = 2.5.0.0 base-version = c8388399 diff --git a/singularity-api/src/main/java/singularity/data/update/UpdateType.java b/singularity-api/src/main/java/singularity/data/update/UpdateType.java index f87ea3d3..91210717 100644 --- a/singularity-api/src/main/java/singularity/data/update/UpdateType.java +++ b/singularity-api/src/main/java/singularity/data/update/UpdateType.java @@ -94,12 +94,6 @@ public UpdateFunction defaultParser(String identifier) { * Adjusts the given time in milliseconds, ensuring that the `millis + millisBetweenUpdates - adjusted amount` * is always less than @link{System#currentTimeMillis()} when the method is called @link{millisBetweenUpdates} * after the last update. - * For example, - * given getAdjustedMillis(date.getTime()) + getMillisBetweenUpdates() < System.currentTimeMillis(), - * if date.getTime() = 1000, getMillisBetweenUpdates() = 1000, System.currentTimeMillis() = 2000, - * it will return 1000 - 1 = 999 - * if date.getTime() = 1010, getMillisBetweenUpdates() = 1000, System.currentTimeMillis() = 2000, - * it will return 1001 - 1 = 1000 * * @param millis The time in milliseconds to adjust. * @return The adjusted time in milliseconds. diff --git a/spigot/build.gradle b/spigot/build.gradle index 0bacda95..9e818bdb 100644 --- a/spigot/build.gradle +++ b/spigot/build.gradle @@ -31,6 +31,10 @@ dependencies { compileOnly project(path: ":StreamlineCore-Singularity") } -tasks.named("compileJava").configure { +compileJava { + dependsOn(":StreamlineCore-BAPI:jar") +} + +delombok { dependsOn(":StreamlineCore-BAPI:jar") } \ No newline at end of file diff --git a/velocity/build.gradle b/velocity/build.gradle index 949a04d8..5417fd63 100644 --- a/velocity/build.gradle +++ b/velocity/build.gradle @@ -17,6 +17,10 @@ dependencies { compileOnly project(path: ':StreamlineCore-Singularity') } -tasks.named("compileJava").configure { +compileJava { + dependsOn(":StreamlineCore-API:jar") +} + +delombok { dependsOn(":StreamlineCore-API:jar") }