diff --git a/build.gradle.old b/build.gradle.old deleted file mode 100644 index 396f079e1..000000000 --- a/build.gradle.old +++ /dev/null @@ -1,171 +0,0 @@ -plugins { - id 'java' - id 'com.modrinth.minotaur' version '2.+' - id 'io.papermc.hangar-publish-plugin' version '0.0.5' -} - -defaultTasks 'build' - -def buildNum = System.getenv('NEXT_BUILD_NUMBER') ?: 'SNAPSHOT' -project.group = 'net.pl3x.map' -project.version = "$minecraftVersion-$buildNum" - -dependencies { - compileOnly project(':core') - compileOnly project(':bukkit') - compileOnly project(':fabric') - //compileOnly project(':forge') -} - -def copyJavadocAndSources = tasks.register('copyJavadocAndSources', Copy) { - from("$rootDir/core/build/libs") { - include "*-*-*-*-*.jar" - } - into layout.buildDirectory.dir('libs') - rename "${rootProject.name}-core-${version}-javadoc.jar", "${rootProject.name}-${version}-javadoc.jar" - rename "${rootProject.name}-core-${version}-sources.jar", "${rootProject.name}-${version}-sources.jar" -} - -def combineJars = tasks.register('combineJars', Jar) { - mustRunAfter build - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(files(subprojects.findAll { it.name != 'webmap' }.collect { - it.layout.buildDirectory.file("libs/${rootProject.name}-${it.name}-${it.version}.jar").get() - }).filter { it.name != 'MANIFEST.MF' }.collect { if (it.isDirectory()) it else zipTree(it) }) - manifest { - // this must be here because it overrides the default jar task - attributes['Main-Class'] = "${rootProject.group}.core.Pl3xMap" - def commit = 'git rev-parse --short HEAD'.execute() - commit.waitFor() - attributes['Git-Commit'] = commit.text.trim() - } - finalizedBy copyJavadocAndSources -} - -def copyWebmap = tasks.register('copyWebmap', Copy) { - dependsOn ':webmap:buildWebmap' - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from "$rootDir/webmap/public", "$rootDir/webmap/dist" - include '**/*' - exclude 'tiles*/' - into "$rootDir/core/src/main/resources/web" -} - -assemble { - subprojects - .findAll { it.name != 'webmap' } - .forEach { project -> - dependsOn ":${project.name}:build" - } - // after subprojects are finished we can combine their jars into a fatjar - finalizedBy combineJars -} - -allprojects { - if (name == 'webmap') { - return - } - - apply plugin: 'java' - - java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } - } - - repositories { - mavenCentral() - maven { - name = 'sonatype-snapshots' - url = 'https://oss.sonatype.org/content/repositories/snapshots/' - mavenContent { - snapshotsOnly() - } - } - maven { - url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' - mavenContent { - snapshotsOnly() - } - } - maven { - url = 'https://jitpack.io' - } - } - - dependencies { - implementation "org.incendo:cloud-core:$cloudVersion" - implementation "org.incendo:cloud-brigadier:$cloudVersion" - implementation "org.incendo:cloud-paper:$cloudVersion" - implementation "org.incendo:cloud-processors-confirmation:1.0.0-SNAPSHOT" - implementation("org.incendo:cloud-minecraft-extras:$cloudVersion") { - exclude group: 'net.kyori', module: '*' - } - - implementation "net.kyori:adventure-api:$adventureVersion" - implementation "net.kyori:adventure-text-minimessage:$adventureVersion" - implementation "net.kyori:adventure-text-serializer-plain:$adventureVersion" - implementation "net.kyori:adventure-platform-bukkit:$adventureBukkitVersion" - - implementation "com.github.ben-manes.caffeine:caffeine:$caffeineVersion" - implementation "com.github.Querz:NBT:$querzNbtVersion" - implementation "org.lz4:lz4-java:1.8.0" - implementation("com.github.Carleslc.Simple-YAML:Simple-Yaml:$simpleYamlVersion") { - exclude group: 'org.yaml', module: 'snakeyaml' - } - - implementation "io.undertow:undertow-core:$undertowVersion" - //implementation "org.jboss.xnio:xnio-nio:$xnioVersion" - - // provided by mojang - compileOnly "com.google.code.gson:gson:$gsonVersion" - compileOnly "com.google.guava:guava:$guavaVersion" - //noinspection VulnerableLibrariesLocal - compileOnly "org.apache.logging.log4j:log4j-core:$log4jVersion" - compileOnly "org.slf4j:slf4j-api:$slf4jVersion" - } - - jar { - if (rootProject.name == project.name) { - archiveBaseName = rootProject.name - } else { - archiveBaseName = "${rootProject.name}-${project.name}" - } - } - - compileJava { - options.encoding = 'UTF-8' - options.release.set(21) - } - - processResources { - filteringCharset = 'UTF-8' - } -} - -modrinth { - autoAddDependsOn = false - token = System.getenv('MODRINTH_TOKEN') - projectId = 'pl3xmap' - versionName = "${project.version}" - versionNumber = "${project.version}" - versionType = 'beta' - uploadFile = rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}.jar").get() - //additionalFiles.addAll([ - // rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}-javadoc.jar").get(), - // rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}-sources.jar").get() - //]) - gameVersions.addAll(["${minecraftVersion}"]) - loaders.addAll(['bukkit', 'fabric', /*'forge',*/ 'paper', 'purpur', 'quilt', 'spigot', 'folia']) - changelog = System.getenv('COMMIT_MESSAGE') - dependencies { - required.project 'fabric-api' - // optional.project 'pl3xmap-banners' - // optional.project 'pl3xmap-claims' - // optional.project 'pl3xmap-mobs' - // optional.project 'pl3xmap-signs' - // optional.project 'pl3xmap-warps' - // optional.project 'deathspots' - } -} diff --git a/bukkit/build.gradle.old b/bukkit/build.gradle.old deleted file mode 100644 index 07d955be3..000000000 --- a/bukkit/build.gradle.old +++ /dev/null @@ -1,41 +0,0 @@ -plugins { - id 'java' - id 'io.papermc.paperweight.userdev' version "$paperweightVersion" -} - -group = "${rootProject.group}.bukkit" -version = rootProject.version - -dependencies { - compileOnly project(':core') - - paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:$bukkitVersion") -} - -base { - archivesName = "${rootProject.name}-${project.name}" -} - -assemble { - dependsOn reobfJar - doLast { - delete fileTree("$buildDir").include('**/*-dev*.jar') - } -} - -reobfJar { - outputJar = file("$buildDir/libs/${rootProject.name}-${project.name}-${project.version}.jar") -} - -processResources { - filesMatching('plugin.yml') { - expand( - 'name': rootProject.name, - 'group': project.group, - 'version': project.version, - 'authors': authors, - 'description': project.properties['description'], - 'website': website - ) - } -} diff --git a/core/build.gradle.old b/core/build.gradle.old deleted file mode 100644 index 4c7a7f606..000000000 --- a/core/build.gradle.old +++ /dev/null @@ -1,69 +0,0 @@ -plugins { - id 'java' - id 'io.github.goooler.shadow' version "$shadowJarVersion" -} - -group = "${rootProject.group}.core" -version = rootProject.version - -base { - archivesName = "${rootProject.name}-${project.name}" -} - -java { - withJavadocJar() - withSourcesJar() -} - -clean { - delete("$projectDir/src/main/resources/web") -} - -assemble { - dependsOn(shadowJar) - doLast { - delete fileTree(dir: "$buildDir", include: '**/*-dev*.jar') - } -} - -shadowJar { - archiveBaseName = "${rootProject.name}-${project.name}" - archiveClassifier = '' - mergeServiceFiles() - exclude( - 'META-INF/LICENSE', - 'META-INF/LICENSE.txt' - ) - [ - //'org.incendo', // do not relocate - 'com.github.benmanes.caffeine.cache', - 'com.github.Carleslc.Simple-YAML', - 'com.google.errorprone.annotations', - 'com.luciad', - //'io.leangen.geantyref', // do not relocate! - 'io.undertow', - //'net.kyori', // do not relocate! - 'net.querz', - 'net.jpountz', - 'org.checkerframework', - 'org.jboss', - 'org.simpleyaml', - 'org.wildfly', - 'org.xnio', - 'org.yaml.snakeyaml', - ].forEach { relocate it, "libs.$it" } -} - -javadoc { - options.encoding = 'UTF-8' - options.addBooleanOption('html5', true) - title = "${rootProject.name}-${project.version} API" -} - -processResources { - dependsOn ":copyWebmap" -} - -sourcesJar { - dependsOn ":copyWebmap" -} diff --git a/fabric/build.gradle.old b/fabric/build.gradle.old deleted file mode 100644 index fc95b3f3c..000000000 --- a/fabric/build.gradle.old +++ /dev/null @@ -1,64 +0,0 @@ -plugins { - id 'java' - id 'fabric-loom' version "$fabricLoomVersion" -} - -group = "${rootProject.group}.fabric" -version = rootProject.version - -repositories { - maven { url = 'https://maven.fabricmc.net/' } - maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' } - maven { - url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' - mavenContent { snapshotsOnly() } - } -} - -dependencies { - compileOnly project(':core') - - minecraft "com.mojang:minecraft:$minecraftVersion" - mappings loom.officialMojangMappings() - - modImplementation "net.fabricmc:fabric-loader:$fabricLoaderVersion" - modImplementation "net.fabricmc.fabric-api:fabric-api:$fabricApiVersion" - modImplementation include("org.incendo:cloud-fabric:$cloudVersion") - modImplementation include("net.kyori:adventure-platform-fabric:$adventureFabricVersion") -} - -base { - archivesName = "${rootProject.name}-${project.name}" -} - -remapJar { - dependsOn ":core:shadowJar" -} - -processResources { - filesMatching('fabric.mod.json') { - expand( - 'name': rootProject.name, - 'group': project.group, - 'version': project.version, - //'authors': authors, // fabric is dumb and wont compile with this :/ - 'description': project.properties['description'], - 'fabricApiVersion': fabricApiVersion, - 'fabricLoaderVersion': fabricLoaderVersion, - 'minecraftVersion': minecraftVersion, - 'website': website, - 'sources': sources, - 'issues': issues, - ) - } -} - -loom { - mixin { - defaultRefmapName = 'pl3xmap.refmap.json' - } - accessWidenerPath = file('src/main/resources/pl3xmap.accesswidener') - runConfigs.configureEach { - ideConfigGenerated(true) - } -}