Skip to content

Commit

Permalink
Merge pull request #2 from EraTiem-Network/next
Browse files Browse the repository at this point in the history
v1.0.0.alpha2
  • Loading branch information
Motzkiste authored Apr 27, 2023
2 parents 2c18b70 + 191d7be commit 00c7d32
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 114 deletions.
27 changes: 15 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toUpperCaseAsciiOnly
import java.util.stream.Collectors

plugins {
Expand All @@ -8,7 +7,7 @@ plugins {
}

group = "net.eratiem"
version = "1.0.0.alpha1"
version = "1.0.0.alpha2"

subprojects {
this.group = rootProject.group
Expand All @@ -28,10 +27,12 @@ subprojects {

dependencies {
val tools: Project? = findProject(":tools")
if (tools != null && tools != project) implementation(project(":tools"))
if (tools != null && tools != project) implementation(project(path = ":tools", configuration = "shadow"))

compileOnly(rootProject.libs.kotlin.gradleplugin)
compileOnly(rootProject.libs.kotlin.stdlib)

compileOnly(rootProject.libs.minecraft.plugin.eralogger)
}

configurations {
Expand All @@ -52,7 +53,9 @@ subprojects {
)

archiveBaseName.set(rootProject.name)
archiveClassifier.set(project.name)
archiveClassifier.set(null as String?)
if (project.name != "tools")
archiveAppendix.set(project.name)

}
if (project.name == "tools")
Expand Down Expand Up @@ -118,17 +121,15 @@ subprojects {
}
}

fun getAsYamlList(commaSeparatedList: Any?): String {
fun getAsYamlList(commaSeparatedList: Any?): String =
if (commaSeparatedList is String && commaSeparatedList.isNotBlank()) {
return commaSeparatedList
commaSeparatedList
.replace(" ", "")
.split(",")
.stream()
.map { "\n - $it" }
.collect(Collectors.joining())
}
return ""
}
} else ""

repositories {
bitBuildArtifactory()
Expand All @@ -151,9 +152,11 @@ fun RepositoryHandler.bitBuildArtifactory(
val url: String
val name: String
if (publish) {
val isSnapshot = project.version.toString().toUpperCaseAsciiOnly().contains("SNAPSHOT")
url = "https://artifactory.bit-build.de/artifactory/eratiem${if (isSnapshot) "-snapshots" else ""}"
name = "BitBuildArtifactoryEraTiem${if (isSnapshot) "Snapshots" else ""}"
val nonReleaseStrings = listOf("snapshot", "alpha", "beta", "rc")
val isNonRelease =
nonReleaseStrings.any { project.version.toString().contains(it, true) }
url = "https://artifactory.bit-build.de/artifactory/eratiem${if (isNonRelease) "-snapshots" else ""}"
name = "BitBuildArtifactoryEraTiem${if (isNonRelease) "Snapshots" else ""}"

} else {
url = "https://artifactory.bit-build.de/artifactory/public"
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
kotlin = "1.8.20"
kotlin = "1.8.21"
shadow = "8.1.1"
run = "2.0.1"
run = "2.1.0"

# Minecraft Software
spigot = "1.19.4-R0.1-SNAPSHOT"
Expand Down Expand Up @@ -31,7 +31,7 @@ minecraft-proxy-waterfall = { group = "io.github.waterfallmc", name = "waterfall
minecraft-proxy-velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }

# Minecraft Plugin Dependencies
minecraft-plugin-eralogger = { group = "net.eratiem", name = "eralogger", version = "1.1.0" }
minecraft-plugin-eralogger = { group = "net.eratiem", name = "eralogger", version = "1.0.0.alpha1" }

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
Expand Down
10 changes: 6 additions & 4 deletions gradle/module-resources/folia.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
plugins {
// alias(libs.plugins.run.paper)
alias(libs.plugins.run.paper)
}

dependencies {
compileOnly(libs.minecraft.server.folia)
}

//tasks.runServer {
// minecraftVersion("1.19.4")
//}
tasks {
runPaper.folia.registerTask {
minecraftVersion("1.19.4")
}
}
2 changes: 1 addition & 1 deletion gradle/module-resources/tools.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (properties["enableToolsMavenDependency"] == "true") {
publications {
create<MavenPublication>("Tools") {
groupId = project.group.toString()
artifactId = rootProject.name.toLowerCase()
artifactId = rootProject.name.lowercase()
version = project.version.toString()

artifact(rootProject.ext["toolsArtifact"] as TaskProvider<*>)
Expand Down
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-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
184 changes: 92 additions & 92 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import javax.inject.Inject
@Plugin(
id = "eralogger",
name = "EraLogger",
version = "1.1.0",
version = "1.0.0.alpha2",
description = "Logger for EraTeam-Networks Plugins",
authors = ["Motzkiste"],
dependencies = [Dependency(id = "kotlinprovider")]
Expand Down

0 comments on commit 00c7d32

Please sign in to comment.