Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IGalat/libnine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.2.3jr
Choose a base ref
...
head repository: IGalat/libnine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.12.2
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 3, 2024

  1. Add publishing capability

    IGalat committed Apr 3, 2024
    Copy the full SHA
    c51cdc4 View commit details
  2. Add dev notes to README.md

    IGalat committed Apr 3, 2024
    Copy the full SHA
    90c0c45 View commit details
  3. Add dev notes to README.md

    IGalat committed Apr 3, 2024
    Copy the full SHA
    76080d9 View commit details
Showing with 57 additions and 7 deletions.
  1. +18 −0 README.md
  2. +39 −7 build.gradle
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,3 +6,21 @@ Fork of https://github.com/phantamanta44/libnine
- `Tab` and `Enter` can be used for navigation, excel-like
- `Delete` deletes value from text field
- `k` adds 000 to the value, or sets to 1000 if empty

---

---

Notes to developers / reminder to me:

Commands can be run from gradle IDEA tab, it will use project java which is better.

- on checkout, `gradle build` to get deps etc.
- then `gradle genIntellijRuns` to get IDEA setup
- when finished, `gradle publishToMavenLocal` to make this version available to deps

Issues:

- `ParameterizedItemModelLoader:37` private access - META_INF/libnine_at.cfg should make fields public
In `build.gradle` `accessTransformer = file('src/main/resources/META-INF/libnine_at.cfg')` is responsible for this
- Try clicking gradle reload if anything weird
46 changes: 39 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -11,6 +11,11 @@ buildscript {

apply plugin: "java"
apply plugin: "net.minecraftforge.gradle"
apply plugin: 'maven-publish'

version = '1.2.3jr'
group = 'io.github.phantamanta44.libnine'
archivesBaseName = 'libnine-1.12.2'

java.toolchain.languageVersion = JavaLanguageVersion.of(8)
compileJava {
@@ -64,12 +69,39 @@ processResources {
rename 'libnine_at.cfg', 'META-INF/libnine_at.cfg'
}

//jar {
// manifest {
// attributes 'FMLAT': 'libnine_at.cfg'
// }
//}

//When Forge 1.12 loads mods from a directory that's been put on the classpath, it expects to find resources in the same directory.
//Default Gradle behavior puts resources in ./build/resources/main instead of ./build/classes/main/java. Let's change that.
sourceSets.all { it.output.resourcesDir = it.output.classesDirs.getFiles().iterator().next() }
sourceSets.all { it.output.resourcesDir = it.output.classesDirs.getFiles().iterator().next() }


task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}

task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}

jar {
manifest {
attributes 'FMLAT': 'libnine_at.cfg'
}
}

artifacts {
archives deobfJar
archives sourcesJar
}

publishing {
publications {
all(MavenPublication) {
artifact jar
artifact deobfJar
artifact sourcesJar
artifactId = archivesBaseName
}
}
}