3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-06 00:00:47 +01:00
Velocity/api/build.gradle

70 Zeilen
1.6 KiB
Groovy

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '2.0.4'
id 'maven-publish'
}
sourceSets {
ap {
compileClasspath += main.compileClasspath + main.output
}
}
dependencies {
compile 'com.google.code.gson:gson:2.8.5'
compile "com.google.guava:guava:${guavaVersion}"
2018-08-12 23:19:02 +02:00
compile 'net.kyori:text:1.12-1.6.4'
compile 'com.moandjiezana.toml:toml4j:0.7.2'
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile 'com.google.inject:guice:4.2.0'
compile 'org.checkerframework:checker-qual:2.5.4'
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testCompile "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
from sourceSets.ap.output
}
jar {
from sourceSets.ap.output
}
shadowJar {
from sourceSets.ap.output
}
artifacts {
archives javadocJar
archives shadowJar
archives sourcesJar
2018-08-12 23:19:02 +02:00
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
2018-08-22 05:58:17 +02:00
repositories {
maven {
name = 'myRepo'
2018-08-22 05:58:42 +02:00
def base = project.ext.getCurrentBranchName() == "master" ? 'file:///maven-repo' : File.createTempDir().toURI().toURL().toString()
2018-08-22 05:58:17 +02:00
def releasesRepoUrl = "$base/releases"
def snapshotsRepoUrl = "$base/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
2018-08-22 05:35:09 +02:00
}
2018-08-22 05:58:17 +02:00
}