Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ ProtocolSupportBungee
<span class="badge-paypal"><a href="https://www.paypal.com/cgi-bin/webscr?return=&business=true-games.org%40yandex.ru&bn=PP-DonationsBF%3Abtn_donateCC_LG.gif%3ANonHosted&cmd=_donations&rm=1&no_shipping=1&currency_code=USD" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>

Support for 1.6, 1.5, 1.4.7, pe clients on BungeeCord<br>
This plugin is under development
This plugin is not anymore under development

Important notes:
* Only latest version of this plugin is supported
* This plugin can't be reloaded or loaded not at BungeeCord startup
* This plugin only works with travertine-1.16

---

Expand Down
143 changes: 32 additions & 111 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,111 +1,32 @@
buildscript {
repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
}
}
dependencies {
classpath group: 'com.github.HurricaneGamesOrg', name: 'ManualGradleDependencySupplier', version: '1e9e953fb4'
}
}

plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
id 'java'
}

apply plugin: 'org.hurricanegames.ManualGradleDependencySupplier'


defaultTasks 'build'


group 'protocolsupport'
version '1.16.3-1'


import java.nio.file.Path
import java.nio.file.Paths
import java.nio.file.Files

import org.hurricanegames.manualgradledependencysupplier.DependencySupplier
import org.hurricanegames.manualgradledependencysupplier.DownloadDependencySupplier
import org.hurricanegames.manualgradledependencysupplier.ManualGradleDependencySupplier


Path projectDirectoryPath = projectDir.toPath().toAbsolutePath()


sourceCompatibility = JavaVersion.VERSION_1_8

sourceSets {
main {
java {
srcDirs = ['src']
}
resources {
srcDirs = ['resources']
}
}
}

repositories {
mavenCentral()
}

dependencies {
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1'
compile group: 'it.unimi.dsi', name: 'fastutil', version: '8.2.2'

compileOnly ManualGradleDependencySupplier.supplyDependecies(
projectDirectoryPath.resolve('libraries_runtime'),
[
new DownloadDependencySupplier(
'bungeecord-1.16.4-1.jar',
new URL('https://papermc.io/api/v1/travertine/1.16/163/download')
)
],
true
)
}

compileJava {
doFirst {
classpath -= configurations.compileOnly
classpath += configurations.compileOnly
}

options.encoding = 'UTF-8'
options.incremental = false
}


shadowJar {
from sourceSets.main.java.srcDirs
from 'LICENSE'

archiveName = jar.archiveName

exclude 'META-INF/**'
relocate 'org.apache', 'protocolsupport.libs.org.apache'
relocate 'it.unimi.dsi.fastutil', 'protocolsupport.libs.it.unimi.dsi.fastutil'

minimize()
}


task copyFinalJarToTarget(type: DefaultTask) {doLast{
Path targetJarDirectory = projectDirectoryPath.resolve("target")
Files.createDirectories(targetJarDirectory)
Files.copy(
shadowJar.archivePath.toPath().toAbsolutePath(),
targetJarDirectory.resolve(shadowJar.baseName + '.jar'),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
}}


jar.enabled = false
jar.finalizedBy(shadowJar)
shadowJar.finalizedBy(copyFinalJarToTarget)
plugins {
id 'java'
}

group = 'de.test'
version = '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
implementation('org.apache.commons:commons-lang3:3.12.0')
implementation('it.unimi.dsi:fastutil:8.5.8')

compileOnly(files("./lib/waterfall.jar"))
}

compileJava.options.encoding = 'UTF-8'

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

task customFatJar(type: Jar) {
archiveBaseName = 'plugin'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}


Loading