Add a API only dependency
mcenderdragon opened this issue ยท 5 comments
right now only the full mod is added to maven, it would be nice to just have the API package, as it would ease development.
This could be done by adding to the build.gralde something like:
task apiJar(type: Jar) {
classifier = 'api'
from sourceSets.main.allSource
from sourceSets.main.output
include 'dan200/computercraft/api/**/*
}
build.dependsOn apiJar
Mabe also need to add the followign to the publishing task:
from components.java
artifacts = [sourceJar, apiJar, jar]
I don't really know much about modding, but wouldn't be useless?
I mean, you would still need the whole mod to test it.
for testing yeah, but not for compiling it. you want to compile against the api and test against the full mod at runtime.
So (correct me if I got this wrong) you don't have two copies of cc (one in your addon and the mod itself) and your compiled addon becomes smaller ..?
So (correct me if I got this wrong) you don't have two copies of cc (one in your addon and the mod itself) and your compiled addon becomes smaller ..?
No not realy, this is just so you can start porting & compiling mods/addon without CC being fully ported yet as you only need the API. Like JEI the api stayes the same but the implementation changes with each version.
YOu dont ship your dependecies with your mod or else everything will break.