Skip to content

Commit

Permalink
Merge pull request #254 from CloudNetService/development
Browse files Browse the repository at this point in the history
Update v3.3.0-RELEASE
  • Loading branch information
juliarn authored May 16, 2020
2 parents 6577bbd + 521c3bc commit 8ef0d76
Show file tree
Hide file tree
Showing 694 changed files with 22,079 additions and 15,519 deletions.
2 changes: 1 addition & 1 deletion .template/start.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
screen -S CloudNet java -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:MaxPermSize=256M -XX:+UnlockExperimentalVMOptions -XX:+UseCompressedOops -XX:-UseAdaptiveSizePolicy -XX:CompileThreshold=100 -Dfile.encoding=UTF-8 -Xmx456M -Xms256m -jar launcher.jar
screen -RS CloudNet java -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:MaxPermSize=256M -XX:+UnlockExperimentalVMOptions -XX:+UseCompressedOops -XX:-UseAdaptiveSizePolicy -XX:CompileThreshold=100 -Dfile.encoding=UTF-8 -Xmx456M -Xms256m -jar launcher.jar
47 changes: 34 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pipeline {
agent any
tools {
gradle 'Gradle6'
jdk 'Java11'
}
options {
Expand All @@ -9,31 +10,39 @@ pipeline {
stages {
stage('Clean') {
steps {
sh 'chmod +x ./gradlew';
sh './gradlew clean';
configFileProvider([configFile(fileId: "e94f788c-1d9c-48d4-b9a9-8286ff68275e", targetLocation: 'gradle.properties')]) {
sh 'gradle clean';
}
}
}
stage('Test') {
steps {
sh './gradlew test';
sh 'gradle test';
junit '**/build/test-results/test/*.xml';
}
}
stage('Build') {
steps {
sh './gradlew jar';
sh 'gradle jar';
}
}
stage('Release ZIP') {
steps {
echo 'Creating CloudNet.zip file...';
sh 'mkdir -p temp';
sh 'cp -r .template/* temp/';

sh 'mkdir temp/dev';
sh 'mkdir temp/dev/examples';
sh 'cp -r cloudnet-examples/src/main/java/de/dytanic/cloudnet/examples/* temp/dev/examples';
sh 'mkdir temp/plugins';
sh 'cp cloudnet-plugins/**/build/libs/*.jar temp/plugins/';

sh 'mkdir temp/extras/plugins';
sh 'cp cloudnet-plugins/**/build/libs/*.jar temp/extras/plugins/';

sh 'mkdir temp/extras/modules';
sh 'cp cloudnet-modules/cloudnet-labymod/build/libs/*.jar temp/extras/modules/';
sh 'cp cloudnet-modules/cloudnet-npcs/build/libs/*.jar temp/extras/modules/';

sh 'cp cloudnet-launcher/build/libs/launcher.jar temp/launcher.jar';
zip archive: true, dir: 'temp', glob: '', zipFile: 'CloudNet.zip';
sh 'rm -r temp/';
Expand All @@ -51,24 +60,36 @@ pipeline {
sh 'rm -r temp/';
}
}
stage('Maven') {
stage('Maven Publish') {
when {
anyOf {
branch 'master';
branch 'development';
}
}
steps {
echo 'Creating artifacts for the maven repo...';
sh './gradlew sourceJar';
sh './gradlew deploymentJar';
sh './gradlew javadocJar';
echo 'Publishing artifacts to Apache Archiva...';
sh 'gradle publish';
}
}
stage('Javadoc') {
steps {
echo 'Creating javadoc...';
sh './gradlew allJavadoc';
sh 'gradle allJavadoc';
zip archive: true, dir: 'build/javadoc', glob: '', zipFile: 'Javadoc.zip';
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: '**/build/libs/*.jar'
archiveArtifacts artifacts: '**/build/libs/*.jar';
archiveArtifacts artifacts: '**/build/libs/*.cnl';
}
}
}
post {
always {
withCredentials([string(credentialsId: 'cloudnet-discord-ci-webhook', variable: 'url')]) {
discordSend description: 'New build for CloudNet v3!', footer: 'New build!', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), title: JOB_NAME, webhookURL: url
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@
- Application support for [GlowStone Minecraft server for MC **1.8.9+**](https://glowstone.net)
- Application support for [Velocity Minecraft Java edition proxy server](https://www.velocitypowered.com)
- Application support for [Waterdog Minecraft Bedrock Edition proxy server](https://github.com/yesdog/Waterdog)
- Application support for [ProxProx Minecraft Bedrock Edition proxy server](https://github.com/GoMint/ProxProx)
- Application support for [GoMint Minecraft Bedrock Edition server software](https://github.com/GoMint/GoMint)
- A **really big API** for **asynchronously** programming or **synchronously** programming
- A **Bridge module**, which includes the basics for the Bukkit, Sponge, BungeeCord and Nukkit API and for BungeeCord a /cloudnet command to dispatch the console of CloudNet ingame
- **BungeeCord exploit protection** with the Bridge Module for BungeeCord MC **1.8.8+** and Velocity
- **Random Hub** and **/hub** command with the Bridge Module for BungeeCord MC **1.8.8+**, Velocity and ProxProx
- **/cloudnet** command which dispatches the console of CloudNet Ingame for BungeeCord MC **1.8.8+**, Velocity and ProxProx
- **Random Hub** and **/hub** command with the Bridge Module for BungeeCord MC **1.8.8+** and Velocity
- **/cloudnet** command which dispatches the console of CloudNet Ingame for BungeeCord MC **1.8.8+** and Velocity
- A live, ingame, sorted signs system for Bukkit and Sponge with a dynamic animation and configuration for each group.
- A **SyncProxy module**, which include the **synchronization between two or more BungeeCord services** in one group.
- **Motd** layout configuration and synchronizing between Proxys with **SyncProxy module**
Expand Down
95 changes: 58 additions & 37 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defaultTasks 'clean', 'build', 'test', 'jar'

allprojects {

def major = 3, minor = 2, patch = 2, versionType = "RELEASE"
def major = 3, minor = 3, patch = 0, versionType = "RELEASE"

group 'de.dytanic.cloudnet'
version "$major.$minor.$patch-$versionType"
Expand All @@ -12,32 +12,26 @@ allprojects {
mavenCentral()

maven {
name 'spongepowered'
url 'https://repo.spongepowered.org/maven'
url 'https://repo.dmulloy2.net/nexus/repository/public/'
}

maven {
name 'vault'
url 'https://repo.md-5.net/repository/releases'
name 'jitpack.io'
url 'https://jitpack.io'
}

maven {
name 'spigotmc-1'
url 'https://repo.md-5.net/service/local/repositories/repobo-rel/content/'
name 'spongepowered'
url 'https://repo.spongepowered.org/maven'
}

maven {
name 'spigotmc-2'
name 'spigotmc-repo'
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}

maven {
name 'md-5'
url 'https://repo.md-5.net/content/repositories/repobo-rel/'
}

maven {
name 'sonatype'
name 'bungeecord-repo'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}

Expand All @@ -50,25 +44,37 @@ allprojects {
name 'nukkix'
url 'https://repo.nukkitx.com/maven-snapshots'
}

maven {
name 'sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}

maven {
name 'vault'
url 'https://repo.md-5.net/repository/releases'
}

}

project.ext {

cloudNetCodeName = 'Eruption'
cloudNetCodeName = 'Hurricane'

//Dependencies
dependencyGuavaVersion = '28.2-jre'
dependencyAnnotationsVersion = '19.0.0'
dependencyLombokVersion = '1.18.6'
dependencyH2Version = '1.4.197'
dependencyGsonVersion = '2.8.6'
dependencyNettyVersion = '4.1.36.Final'
dependencyJLine2Version = '2.14.6'
dependencyJAnsiVersion = '1.17.1'
dependencyNextCloudJavaAPIVersion = '11.0.3'
dependencyBukkitVersion = '1.14.4-R0.1-SNAPSHOT'
dependencyBukkitVersion = '1.15.2-R0.1-SNAPSHOT'
dependencySpongeVersion = '7.0.0'
dependencyBungeeCordVersion = '1.14-SNAPSHOT'
dependencyBungeeCordVersion = '1.15-SNAPSHOT'
dependencyVelocityVersion = '1.0.0-SNAPSHOT'
//dependencyGoMintVersion = '1.0.0-SNAPSHOT'
dependencyNukkitXVersion = '1.0-SNAPSHOT'

testJunitVersion = '4.12'
Expand All @@ -87,7 +93,9 @@ allprojects {

//cloudNet modules
cloudnetModuleBridgeFileName = 'cloudnet-bridge.jar'
cloudnetModuleLabyModFileName = 'cloudnet-labymod.jar'
cloudnetModuleSignsFileName = 'cloudnet-signs.jar'
cloudnetModuleNPCsFileName = 'cloudnet-npcs.jar'
cloudnetModuleSmartFileName = 'cloudnet-smart.jar'
cloudnetModuleSyncProxyFileName = 'cloudnet-syncproxy.jar'
cloudnetModuleCloudflareFileName = 'cloudnet-cloudflare.jar'
Expand All @@ -107,7 +115,7 @@ allprojects {
.append("repo maven https://repo1.maven.org/maven2\n")
.append("# dependencies\n\n")

pro.configurations.compile.resolvedConfiguration.resolvedArtifacts.forEach({
pro.configurations.runtimeClasspath.resolvedConfiguration.resolvedArtifacts.forEach({

if (it.moduleVersion.id.group != project.group) {

Expand Down Expand Up @@ -155,7 +163,8 @@ subprojects {
if (project.name == 'cloudnet-modules' || project.name == 'cloudnet-plugins') return

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'java-library'
apply plugin: 'maven-publish'

compileJava {
options.encoding = 'UTF-8'
Expand All @@ -173,37 +182,49 @@ subprojects {
targetCompatibility = 1.8

dependencies {
implementation group: 'org.jetbrains', name: 'annotations', version: dependencyAnnotationsVersion
compileOnly group: 'org.projectlombok', name: 'lombok', version: dependencyLombokVersion
testCompile group: 'junit', name: 'junit', version: testJunitVersion
testImplementation group: 'junit', name: 'junit', version: testJunitVersion
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: dependencyLombokVersion
}

task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier.set('sources')
}

task deploymentJar(type: Jar, dependsOn: sourceJar) {

def pro = project
from sourceSets.main.output

doLast {
pom {
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
}

}.writeTo("$buildDir/libs/${pro.name}-${pro.version}.pom")
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
repositories {
maven {
if (project.version.endsWith("RELEASE")) {
url 'https://repo.cloudnetservice.eu/repository/releases/'
} else {
url 'https://repo.cloudnetservice.eu/repository/snapshots/'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc
credentials {
username = project.hasProperty("mavenUser") ? project.property("mavenUser") : ""
password = project.hasProperty("mavenPassword") ? project.property("mavenPassword") : ""
}
}
}
}

}

task allJavadoc(type: Javadoc) {

dependsOn ':cloudnet-launcher:jar'

destinationDir = new File(buildDir, 'javadoc')
Expand Down
5 changes: 3 additions & 2 deletions cloudnet-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ jar {
}

dependencies {
compile group: 'com.google.code.gson', name: 'gson', version: dependencyGsonVersion
api group: 'com.google.code.gson', name: 'gson', version: dependencyGsonVersion
api group: 'com.google.guava', name: 'guava', version: dependencyGuavaVersion

testCompile group: 'junit', name: 'junit', version: testJunitVersion
testImplementation group: 'junit', name: 'junit', version: testJunitVersion
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public enum JavaVersion {
JAVA_13(13, 57D, "Java 13"),
JAVA_14(14, 58D, "Java 14");

private int version;
private double versionId;
private String name;
private final int version;
private final double versionId;
private final String name;

JavaVersion(int version, double versionId, String name) {
this.version = version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void load(File file) throws IOException {
* @see java.util.Properties
*/
public void load(Path path) throws IOException {
if (path == null) {
if (path != null) {
load(path.toFile());
}
}
Expand Down
Loading

0 comments on commit 8ef0d76

Please sign in to comment.