Skip to content

Commit

Permalink
Reintroduce source JARs, fix eternal ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
EnnuiL committed Nov 4, 2024
1 parent 6bfdd8d commit 5958ffa
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ plugins {
tasks.named('jar').configure {
it.enabled = false
}

tasks.named('sourcesJar').configure {
it.enabled = false
}
12 changes: 12 additions & 0 deletions buildSrc/src/main/groovy/mod_conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ String createVersionString() {
version = createVersionString()
group = 'io.github.ennuil.ok_zoomer'

java {
withSourcesJar()
}

tasks.named('jar').configure {
inputs.files('LICENSE.md')

Expand All @@ -14,6 +18,14 @@ tasks.named('jar').configure {
}
}

tasks.named('sourcesJar').configure {
inputs.files('LICENSE.md')

it.from(rootDir.toPath().resolve('LICENSE.md')) {
it.rename { "LICENSE_ok_zoomer.md" }
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release.set(21)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public LinearTransitionMode(double minimumLinearStep, double maximumLinearStep)

@Override
public boolean getActive() {
return this.active || this.internalMultiplier != 1.0F || this.internalFade != 1.0F;
return this.active || this.internalMultiplier != 1.0F || this.internalFade != 0.0F;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public SmoothTransitionMode() {

@Override
public boolean getActive() {
return this.active || this.internalMultiplier != 1.0F || this.internalFade != 1.0F;
return this.active || this.internalMultiplier != 1.0F || this.internalFade != 0.0F;
}

@Override
Expand Down
6 changes: 6 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,10 @@ tasks.named('jar').configure {
from(zipTree(project(':common').tasks.named('jar').get().archiveFile))
}

tasks.named('sourcesJar').configure {
it.duplicatesStrategy = DuplicatesStrategy.EXCLUDE

from(zipTree(project(':common').tasks.named('sourcesJar').get().archiveFile))
}

remapJar.getDestinationDirectory().set(layout.buildDirectory.dir('libs'))
7 changes: 7 additions & 0 deletions norge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ tasks.withType(ProcessResources).matching(notNorgeTask).configureEach {

tasks.jar.getDestinationDirectory().set(layout.buildDirectory.dir('libs'))

// This will likely explode somehow..
tasks.named('sourcesJar').configure {
it.duplicatesStrategy = DuplicatesStrategy.EXCLUDE

from(zipTree(project(':common').tasks.named('sourcesJar').get().archiveFile))
}

neoForge {
version = libs.versions.neoforge

Expand Down

0 comments on commit 5958ffa

Please sign in to comment.