dan200 / ComputerCraft

Programmable Computers for Minecraft
Other
984 stars 197 forks source link

Publish the API to a Maven repo #466

Open josephcsible opened 7 years ago

josephcsible commented 7 years ago

We should publish the ComputerCraft API to a Maven repository to make it easier for other mods to use it.

thiakil commented 7 years ago

For reference, to make an api jar, you can use something like this (just need to change the include line)

task apiJar(type: Jar) {
    classifier "api"
    dependsOn "sourceMainJava"
    include 'path/to/api/**'
    from sourceSets.main.java.srcDirs
    from sourceSets.main.output
}

artifacts {
    archives apiJar
}
SquidDev commented 7 years ago

It's worth noting that https://cc.crzd.me has a sort-of-Maven repository running, which one is free to depend on. That's what OpenComputers and Plethora do:

repositories {
  maven { url "https://cc.crzd.me/maven/" }
}
dependencies {
  compile "dan200.computercraft:ComputerCraft:1.81-build3"
}

Obviously having an official repository would be better, but this is a start.

thiakil commented 7 years ago

Even just having the api artifact in the build.gradle would help; I have no issues hosting a copy of it for projects I'm a part of