xbony2 / Nuclear-Control

An updated version of nuclear control.
BSD 3-Clause "New" or "Revised" License
24 stars 36 forks source link

Unable to locate Gradle dev jar to link for API compilation purposes #141

Closed OvermindDL1 closed 8 years ago

OvermindDL1 commented 8 years ago

Unable to locate Gradle dev jar to link for API compilation purposes, currently have to compile this ourselves, which is not easily possible on direct build servers, need a maven entry (can get one from minecraftforge.net if you need, just need one for gradle to be able to link in the dev api).

xbony2 commented 8 years ago

I'd include dev/api jars on CurseForge, but to be honest I don't know how to make those :o

OvermindDL1 commented 8 years ago

Oh they are actually quite easy! :-)

Create a new build type in your build.gradle file, include only your api files in it pre-obf, then add it to the build step so it will generate a new -api.jar file for it. :-)

Deobf'd jars themselves do the same but allow testing within a dev environment too so can just do that as it is all around easier as it is less stuff to do in the build.gradle and it lets the modder using your API test it without needing to setup an entire fully compiled game. Such code would be something like (customize for your bit):

// Add in a source jar for people, should they desire to download such a thing
task sourceJar(type: Jar) {
    from sourceSets.main.allSource
    classifier = 'src'
    version = "${project.minecraft.version}-${project.version}"
}

// Add in an mcp named jar, for those who wish to run in a development environment (assuming mcp naming matches)
task deobfJar(type: Jar) {
    from sourceSets.main.output
    classifier = 'dev'
    version = "${project.minecraft.version}-${project.version}"
}

// Tell the artifact system about our extra jars
artifacts {
    archives sourceJar, deobfJar
}
OvermindDL1 commented 8 years ago

For it to be usable from within gradle by dependency downloading from maven then it needs to be uploaded to a maven repo, you can use any, your own server, whatever. If you want to use the Forge maven server then I can make you a user account and password for it, you would only need to add https://gist.github.com/OvermindDL1/b8ddc127a3ad22dcfe08 to your build.gradle*[edit:Spelling fix] then after you gradle build then just gradle uploadArchives and gradle does everything else automatically and people can use Nuclear Control in their dev environment just by adding a single line to their deps. :-)

Techlone commented 8 years ago

I'm from https://github.com/Blood-Asp/GT5-Unofficial/issues/435 I use NC jar like local library.

dependencies {
    compile files('./build/IC2NuclearControl-2.3.4a.jar')
}

@xbony2 should I to wait until you fix it?

xbony2 commented 8 years ago

To be honest, I'm probably not going to do anything soon.

dmf444 commented 8 years ago

Now available from here: https://drone.io/github.com/xbony2/Nuclear-Control/files

xbony2 commented 8 years ago

And on CurseForge.

draknyte1 commented 5 years ago

Do these still exist anywhere or do I need to get @OvermindDL1 to throw them on his lib repo? Same issue that Techlone mentioned in 2016, since Curse is now broken for dependency management.

Turns out Curse has a Maven repo for everything. https://pastebin.com/cxTQyQtZ

OvermindDL1 commented 5 years ago

@draknyte1 If you need me to toss anything up on the maven repo just say what and where. :-)

OvermindDL1 commented 5 years ago

@draknyte1 Eh actually I just did, I took this repo's master, added in the maven uploading set to its build.gradle file, linked in some missing dependencies (grr), built and uploaded to my maven server. It is available via "com.shedar.IC2NuclearControl:IC2NuclearControl:2.4.3a:dev" as usual. It also has an api classifier as well as the full no-classifier release as usual too, so can use whichever you wish. I went ahead and added it as greg could potentially add support for this and he doesn't trust curse to keep working based on their history, so he likes everything self-hosted.

draknyte1 commented 5 years ago

You had EVERYTHING in your repo except This, EIO and IC2 (non-classic). I recall you saying ages ago to use it and it seems everyone was afk when I did such :D

Least I can drop Curse from the updated GT5 script and it’ll just use yours no hassle. Thanks. :)

OvermindDL1 commented 5 years ago

You had EVERYTHING in your repo except This, EIO and IC2 (non-classic). I recall you saying ages ago to use it and it seems everyone was afk when I did such :D

Lol, Only been adding things as GT6 or some dependent projects need it. IC2 non-classic I haven't been able to find a buildable repo of yet and classic seems to be the version everyone I see using so so that's why it isn't up, but if you want it up there as well then gimme a repo link or full jar distribution set on an existing maven. :-)

As for EIO, haven't needed it yet either, but same thing, link me to the buildable repo and/or a full jar distribution set on a pre-existing maven and I can add it too. ^.^

Least I can drop Curse from the updated GT5 script and it’ll just use yours no hassle. Thanks. :)

For note, you can even drop the forge repo if you want, even from the top level gradle stuff, the forge website going down for a couple of days a while back convinced us it wasn't good to reliably depend on either as it broke the CI pretty horrible so all of that is handled on the maven now as well... >.>

Quite literally though, GT6 (and my reika build system for all reika's mods) just depend on the GT6 maven, sonotype, and the usual mavencenter/jcentral stuff (if those go down then everyone has a bigger issue): https://git.gregtech.overminddl1.com/GregTech-6/GT6/src/branch/master/build.gradle That commented list of dependencies is the latest versions of each on the GT6 repo, however it is not a complete list. I need to automagically generate a list sometime so I don't have to manually keep it up to date...