Skip to content

Commit

Permalink
update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Nov 22, 2023
1 parent a1111ca commit 4a99d25
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ gradlePlugin {

tasks.jar {
from(sourceSets.main.get().output, installer.output)

manifest {
attributes(
"Implementation-Version" to project.version
)
}
}

project.evaluationDependsOnChildren()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ import xyz.wagyourtail.unimined.util.withSourceSet

class PatchCreatorPlugin : Plugin<Project> {

val pluginVersion: String = PatchCreatorPlugin::class.java.`package`.implementationVersion ?: "unknown"


override fun apply(target: Project) {
target.logger.lifecycle("[PatchbaseCreator] Plugin Version: $pluginVersion")
}

}

fun MinecraftConfig.patchBaseCreator() {
if (side == EnvType.COMBINED) {
project.logger.warn("Merged may make applying patches more difficult, proceed with caution")
project.logger.warn("[PatchBase/Creator ${this.project.path} ${sourceSet}] Merged may make applying patches more difficult, proceed with caution")
}
if (!defaultRemapJar) {
project.logger.warn("defaultRemapJar is false, this may cause issues with patching")
project.logger.warn("[PatchBase/Creator ${this.project.path} ${sourceSet}] defaultRemapJar is false, this may cause issues with patching")
}
if (mcPatcher !is JarModAgentMinecraftTransformer) {
project.logger.warn("mcPatcher is not a JarModAgentMinecraftTransformer, this may cause issues with dev runs")
project.logger.warn("[PatchBase/Creator ${this.project.path} ${sourceSet}] mcPatcher is not a JarModAgentMinecraftTransformer, this may cause issues with dev runs")
}

project.tasks.register("createSourcePatch".withSourceSet(sourceSet), CreateSourcePatchTask::class.java) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import org.gradle.api.Project

class PatchPlugin : Plugin<Project> {

val pluginVersion: String = PatchPlugin::class.java.`package`.implementationVersion ?: "unknown"


override fun apply(target: Project) {
target.logger.lifecycle("[Patchbase] Plugin Version: $pluginVersion")
}

}

0 comments on commit 4a99d25

Please sign in to comment.