Skip to content

Gradle and refactor #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 54 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/java,macos,maven,gradle,eclipse,windows,jetbrains+all
# Edit at https://www.toptal.com/developers/gitignore?templates=java,macos,maven,gradle,eclipse,windows,jetbrains+all
# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,maven,intellij+all,eclipse,windows,linux,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,maven,intellij+all,eclipse,windows,linux,macos

### Eclipse ###
.metadata
@@ -67,33 +67,7 @@ local.properties
# Spring Boot Tooling
.sts4-cache/

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### JetBrains+all ###
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

@@ -127,14 +101,14 @@ replay_pid*
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/
@@ -172,7 +146,7 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### JetBrains+all Patch ###
### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

@@ -181,6 +155,47 @@ fabric.properties
!.idea/codeStyles
!.idea/runConfigurations

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
@@ -284,4 +299,4 @@ gradle-app.setting
# Java heap dump
*.hprof

# End of https://www.toptal.com/developers/gitignore/api/java,macos,maven,gradle,eclipse,windows,jetbrains+all
# End of https://www.toptal.com/developers/gitignore/api/java,gradle,maven,intellij+all,eclipse,windows,linux,macos
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -3,20 +3,20 @@ pipeline {

tools {
jdk 'Jdk17'
maven 'maven'
maven 'gradle'
}

stages {
stage('Build') {
steps {
echo 'Building..'
sh 'mvn clean package'
sh './gradlew clean build'
}
post {
success {
archiveArtifacts 'spigot/target/GeyserBlockPlatform-Spigot.jar'
archiveArtifacts 'bungeecord/target/GeyserBlockPlatform-Bungeecord.jar'
archiveArtifacts 'velocity/target/GeyserBlockPlatform-Velocity.jar'
archiveArtifacts 'spigot/build/libs/GeyserBlockPlatform-Spigot.jar'
archiveArtifacts 'bungeecord/build/libs/GeyserBlockPlatform-Bungeecord.jar'
archiveArtifacts 'velocity/build/libs/GeyserBlockPlatform-Velocity.jar'
}
}
}
@@ -59,7 +59,7 @@ pipeline {
env.changes = message
}

discordSend description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n${changes}\n\n[**Artifacts on Jenkins**](https://ci.projectg.dev/job/GeyserBlockPlatform/)", footer: 'ProjectG', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), result: currentBuild.currentResult, title: "${env.JOB_NAME}", webhookURL: "${env.DISCORD_WEBHOOK}"
discordSend description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n${changes}\n\n[**Artifacts on Jenkins**](https://ci.kejonamc.dev/job/GeyserBlockPlatform/)", footer: 'kejonaMC', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), result: currentBuild.currentResult, title: "${env.JOB_NAME}", webhookURL: "${env.DISCORD_WEBHOOK}"
}
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Camotoy
Copyright (c) 2021 kejonaMC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
58 changes: 58 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

plugins {
`java-library`
id("idea")
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
}

allprojects {
group = "dev.kejona.geyserblockplatform"
version = "2.0-SNAPSHOT"
description = "Prevent specific Bedrock platforms from joining your server"

tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
}
}

subprojects {
apply(plugin = "java-library")

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

dependencies {
annotationProcessor("org.projectlombok:lombok:1.18.28")
compileOnly("org.projectlombok:lombok:1.18.28")

compileOnly("org.jetbrains:annotations:24.0.1")
}

repositories {
mavenCentral()
maven("https://repo.opencollab.dev/main/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.spongepowered.org/maven/")
}

tasks.processResources {
filesMatching(listOf("bungee.yml", "spigot.yml", "extension.yml")) {
expand(
"description" to project.description,
"version" to project.version,
)
}
}
}

idea {
module {
isDownloadJavadoc = true
isDownloadSources = true
}
}
113 changes: 0 additions & 113 deletions bungeecord/.gitignore

This file was deleted.

23 changes: 23 additions & 0 deletions bungeecord/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

plugins {
id("com.github.johnrengelman.shadow")
}

dependencies {
api(projects.common)
compileOnly("net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT")
}

tasks {
shadowJar {
val prefix = "${project.group}.${project.name}.shaded"
relocate("org.spongepowered.configurate", "$prefix.configurate")
relocate("io.leangen.geantyref", "$prefix.geantyref")

archiveFileName.set("GeyserBlockPlatform-Bungeecord.jar")
}

build {
dependsOn(shadowJar)
}
}
Loading
Oops, something went wrong.