Skip to content

Commit

Permalink
build: remove unnecessary "plugin" module
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Jan 24, 2024
1 parent f56d7f6 commit f7e3104
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 46 deletions.
73 changes: 34 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'org.cadixdev.licenser' version '0.6.1' apply false
Expand Down Expand Up @@ -52,19 +54,16 @@ publishing {
}
}

import org.apache.tools.ant.filters.ReplaceTokens

allprojects {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'org.cadixdev.licenser'
apply plugin: 'java'

compileJava.options.encoding = 'UTF-8'
compileJava.options.release.set 17
javadoc.options.encoding = 'UTF-8'
javadoc.options.addStringOption('Xdoclint:none', '-quiet')

compileJava.options.release.set 16

repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -95,8 +94,10 @@ allprojects {
}

processResources {
filter ReplaceTokens as Class, beginToken: '${', endToken: '}',
tokens: rootProject.ext.properties
filesMatching(['**/*.json', '**/*.yml']) {
filter ReplaceTokens as Class, beginToken: '${', endToken: '}',
tokens: rootProject.ext.properties
}
}
}

Expand All @@ -108,47 +109,41 @@ subprojects {
from '../LICENSE'
}

if (['paper'].contains(project.name)) {
compileJava.options.release.set 17
shadowJar {
destinationDirectory.set(file("$rootDir/target"))
archiveClassifier.set('')
}

if (['bukkit', 'paper', 'plugin'].contains(project.name)) {
shadowJar {
// API publishing
if (['common', 'bukkit'].contains(project.name)) {
java {
withSourcesJar()
withJavadocJar()
}
sourcesJar {
destinationDirectory.set(file("$rootDir/target"))
archiveClassifier.set('')
}

// API publishing
if (['common', 'bukkit'].contains(project.name)) {
java {
withSourcesJar()
withJavadocJar()
}
sourcesJar {
destinationDirectory.set(file("$rootDir/target"))
}
javadocJar {
destinationDirectory.set(file("$rootDir/target"))
}
shadowJar.dependsOn(sourcesJar, javadocJar)

publishing {
publications {
mavenJavaCommon(MavenPublication) {
groupId = 'net.william278.husksync'
artifactId = "husksync-${project.name}"
version = "$rootProject.version"
artifact shadowJar
artifact sourcesJar
artifact javadocJar
}
javadocJar {
destinationDirectory.set(file("$rootDir/target"))
}
shadowJar.dependsOn(sourcesJar, javadocJar)

publishing {
publications {
mavenJavaCommon(MavenPublication) {
groupId = 'net.william278.husksync'
artifactId = "husksync-${project.name}"
version = "$rootProject.version"
artifact shadowJar
artifact sourcesJar
artifact javadocJar
}
}
}

jar.dependsOn(shadowJar)
clean.delete "$rootDir/target"
}

jar.dependsOn(shadowJar)
clean.delete "$rootDir/target"
}

logger.lifecycle("Building HuskSync ${version} by William278")
Expand Down
4 changes: 0 additions & 4 deletions plugin/build.gradle

This file was deleted.

3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ rootProject.name = 'HuskSync'
include(
'common',
'bukkit',
'paper',
'plugin'
'paper'
)
2 changes: 1 addition & 1 deletion test/spin_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Parameters:
backend_ports = [25567, 25568]
backend_type = 'paper'
backend_ram = 2048
backend_plugins = ['../target/HuskSync-Plugin-*.jar']
backend_plugins = ['../target/HuskSync-Paper-*.jar']
backend_plugin_folders = ['./HuskSync']
operator_names = ['William278']
operator_uuids = ['5dfb0558-e306-44f4-bb9a-f9218d4eb787']
Expand Down

0 comments on commit f7e3104

Please sign in to comment.