Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic api jar support #472

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 52 additions & 0 deletions build.gradle
Expand Up @@ -109,3 +109,55 @@ gradle.projectsEvaluated {
}
}

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

artifacts {
archives apiJar
}

apply plugin: 'maven'
apply plugin: 'maven-publish'

uploadArchives {
if(System.getenv("LOCAL_MAVEN") != null) {
repositories {
mavenDeployer {
repository(url: "file://"+System.getenv("LOCAL_MAVEN"))
pom {
groupId = project.group
version = project.version
if (System.getenv("MAVEN_ARTIFACT") != null) {
artifactId = System.getenv("MAVEN_ARTIFACT")
} else {
artifactId = "ComputerCraft"
}
project {
name "ComputerCraft"
packaging 'jar'
description 'Programmable Computers for Minecraft'
url 'https://github.com/dan200/ComputerCraft'
scm {
url 'https://github.com/dan200/ComputerCraft.git'
}
issueManagement {
system 'github'
url 'https://github.com/dan200/ComputerCraft/issues'
}
licenses {
license {
name 'ComputerCraft Public License'
distribution 'repo'
}
}
}
}
}
}
}
}