Skip to content

Commit

Permalink
Remove unused feather dep, move jgit dep to core as it's not needed b…
Browse files Browse the repository at this point in the history
…y userdev
  • Loading branch information
jpenilla committed Dec 20, 2024
1 parent d2ad681 commit 47ce362
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 38 deletions.
7 changes: 0 additions & 7 deletions buildSrc/src/main/kotlin/config-kotlin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ repositories {
includeGroupAndSubgroups("io.papermc")
}
}
maven("https://maven.parchmentmc.org") {
name = "ParchmentMC"
mavenContent {
releasesOnly()
includeGroupAndSubgroups("org.parchmentmc")
}
}
maven("https://maven.neoforged.net/releases") {
name = "NeoForged"
mavenContent {
Expand Down
6 changes: 0 additions & 6 deletions buildSrc/src/main/kotlin/config-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ val shadowJar by tasks.existing(ShadowJar::class) {
/* -> */ "org.apache.commons",
"org.cadixdev",
/* -> */ "me.jamiemansfield",
"org.parchmentmc.feather",
/* -> */ "com.google.common",
/* ----> */ "com.google.j2objc",
/* ----> */ "com.google.thirdparty",
/* ----> */ "org.checkerframework",
/* ----> */ "javax.annotation",
"org.eclipse.jgit",
/* -> */ "com.googlecode.javaewah",
/* -> */ "com.googlecode.javaewah32",
Expand Down
4 changes: 0 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ asm = "9.7.1"
lorenz = "0.5.8"
hypo = "1.2.4"
serialize = "1.5.1"
feather = "1.1.0"
jst = "1.0.68+paper.2-SNAPSHOT"
tinyRemapper = "0.10.4"

Expand Down Expand Up @@ -33,9 +32,6 @@ hypo-mappings = { module = "dev.denwav.hypo:hypo-mappings", version.ref = "hypo"
lorenzTiny = "net.fabricmc:lorenz-tiny:3.0.0"
jbsdiff = "io.sigpipe:jbsdiff:1.0"

feather-core = { module = "org.parchmentmc:feather", version.ref = "feather" }
feather-gson = { module = "org.parchmentmc.feather:io-gson", version.ref = "feather" }

diffpatch = "codechicken:DiffPatch:1.5.0.30"

serialize-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialize" }
Expand Down
4 changes: 3 additions & 1 deletion paperweight-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ dependencies {
implementation(variantOf(libs.diffpatch) { classifier("all") }) {
isTransitive = false
}
implementation(libs.jgit)
shade(libs.jgit)

testImplementation(project(":paperweight-lib", "testClassesJar"))
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

package io.papermc.paperweight.core.taskcontainers

import io.papermc.paperweight.core.tasks.patching.ApplyFilePatches
import io.papermc.paperweight.core.tasks.patching.ApplyFilePatchesFuzzy
import io.papermc.paperweight.tasks.*
import io.papermc.paperweight.tasks.softspoon.ApplyFeaturePatches
import io.papermc.paperweight.tasks.softspoon.ApplyFilePatches
import io.papermc.paperweight.tasks.softspoon.ApplyFilePatchesFuzzy
import io.papermc.paperweight.tasks.softspoon.FixupFilePatches
import io.papermc.paperweight.tasks.softspoon.RebuildFilePatches
import io.papermc.paperweight.util.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ package io.papermc.paperweight.core.taskcontainers

import io.papermc.paperweight.core.extension.ForkConfig
import io.papermc.paperweight.core.tasks.ForkSetup
import io.papermc.paperweight.core.tasks.patching.ApplyFilePatches
import io.papermc.paperweight.core.tasks.patching.ApplyFilePatchesFuzzy
import io.papermc.paperweight.tasks.*
import io.papermc.paperweight.tasks.softspoon.ApplyFeaturePatches
import io.papermc.paperweight.tasks.softspoon.ApplyFilePatches
import io.papermc.paperweight.tasks.softspoon.ApplyFilePatchesFuzzy
import io.papermc.paperweight.tasks.softspoon.FixupFilePatches
import io.papermc.paperweight.tasks.softspoon.ImportLibraryFiles
import io.papermc.paperweight.tasks.softspoon.RebuildFilePatches
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ package io.papermc.paperweight.core.taskcontainers

import io.papermc.paperweight.core.coreExt
import io.papermc.paperweight.core.extension.ForkConfig
import io.papermc.paperweight.core.tasks.SetupVanilla
import io.papermc.paperweight.tasks.*
import io.papermc.paperweight.tasks.mache.DecompileJar
import io.papermc.paperweight.tasks.mache.RemapJar
import io.papermc.paperweight.tasks.mache.SetupVanilla
import io.papermc.paperweight.tasks.softspoon.ImportLibraryFiles
import io.papermc.paperweight.tasks.softspoon.IndexLibraryFiles
import io.papermc.paperweight.tasks.softspoon.SetupPaperScript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package io.papermc.paperweight.core.tasks

import io.papermc.paperweight.tasks.*
import io.papermc.paperweight.tasks.mache.commitAndTag
import io.papermc.paperweight.util.*
import io.papermc.paperweight.util.constants.*
import org.eclipse.jgit.api.Git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package io.papermc.paperweight.core.tasks

import io.papermc.paperweight.tasks.*
import io.papermc.paperweight.tasks.mache.commitAndTag
import io.papermc.paperweight.tasks.softspoon.ApplySourceATs
import io.papermc.paperweight.util.*
import kotlin.io.path.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* USA
*/

package io.papermc.paperweight.tasks.mache
package io.papermc.paperweight.core.tasks

import codechicken.diffpatch.cli.PatchOperation
import codechicken.diffpatch.util.LoggingOutputStream
Expand All @@ -30,7 +30,6 @@ import io.papermc.paperweight.tasks.softspoon.ApplySourceATs
import io.papermc.paperweight.util.*
import java.nio.file.Path
import java.util.function.Predicate
import javax.inject.Inject
import kotlin.io.path.*
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.ResetCommand
Expand All @@ -43,7 +42,6 @@ import org.gradle.api.logging.LogLevel
import org.gradle.api.provider.Property
import org.gradle.api.tasks.*
import org.gradle.kotlin.dsl.*
import org.gradle.workers.WorkerExecutor

abstract class SetupVanilla : JavaLauncherTask() {

Expand All @@ -69,9 +67,6 @@ abstract class SetupVanilla : JavaLauncherTask() {
@get:InputDirectory
abstract val macheOld: DirectoryProperty

@get:Inject
abstract val workerExecutor: WorkerExecutor

@get:Nested
val ats: ApplySourceATs = objects.newInstance()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* USA
*/

package io.papermc.paperweight.tasks.softspoon
package io.papermc.paperweight.core.tasks.patching

import codechicken.diffpatch.cli.PatchOperation
import codechicken.diffpatch.match.FuzzyLineMatcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* USA
*/

package io.papermc.paperweight.tasks.softspoon
package io.papermc.paperweight.core.tasks.patching
import codechicken.diffpatch.util.PatchMode
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
* USA
*/

package io.papermc.paperweight.tasks.softspoon
package io.papermc.paperweight.core.tasks

import io.papermc.paperweight.core.tasks.patching.ApplyFilePatches
import io.papermc.paperweight.tasks.*
import java.nio.file.Path
import kotlin.test.BeforeTest
Expand Down
18 changes: 14 additions & 4 deletions paperweight-lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {
implementation(libs.httpclient)
implementation(libs.bundles.kotson)
implementation(libs.coroutines)
implementation(libs.jgit)

// ASM for inspection
implementation(libs.bundles.asm)
Expand All @@ -30,14 +29,25 @@ dependencies {

implementation(libs.lorenzTiny)

implementation(libs.feather.core)
implementation(libs.feather.gson)

implementation(libs.jbsdiff)

implementation(variantOf(libs.diffpatch) { classifier("all") }) {
isTransitive = false
}

testImplementation(libs.jgit)
testImplementation(libs.mockk)
}

val testClassesJar = tasks.register<Jar>("testClassesJar") {
archiveClassifier.set("test-classes")
from(sourceSets.test.get().output.classesDirs)
dependsOn(sourceSets.test.get().classesTaskName)
}
configurations.consumable("testClassesJar") {
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
}
outgoing.artifact(testClassesJar)
}

0 comments on commit 47ce362

Please sign in to comment.