mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-01 08:39:31 +01:00
71 lines
1.7 KiB
Groovy
71 lines
1.7 KiB
Groovy
apply from: rootProject.file('buildscript/relocations.gradle')
|
|
apply plugin: 'maven-publish'
|
|
|
|
dependencies {
|
|
// Annotations
|
|
compileOnlyApi(libs.jetbrains.annotations)
|
|
compileOnlyApi(libs.findbugs.annotations)
|
|
|
|
// JDA
|
|
api(libs.jda) {
|
|
// Annotations are suppose to be compile time only
|
|
exclude group: 'org.jetbrains', module: 'annotations'
|
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
|
|
|
// Downgrade okhttp (due to kotlin)
|
|
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
|
|
|
// We don't use audio
|
|
exclude module: 'opus-java'
|
|
}
|
|
api(libs.okhttp)
|
|
}
|
|
|
|
// Relocations are in buildscript/api.gradle
|
|
|
|
sourceSets {
|
|
ap {
|
|
java {
|
|
compileClasspath += sourceSets.main.compileClasspath + sourceSets.main.output
|
|
}
|
|
}
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
// Fix template source set not being depended on/other tasks not depending on template source set
|
|
sourcesJar { dependsOn compileTemplateJava }
|
|
|
|
jar {
|
|
from sourceSets.ap.output
|
|
}
|
|
|
|
license {
|
|
// Overwrite the default
|
|
header = rootProject.file('buildscript/license/API_LICENSE_HEADER')
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
// Shaded & relocated jar...
|
|
artifact source: shadowJar, classifier: null
|
|
artifact sourcesJar
|
|
artifact javadocJar
|
|
|
|
// ...and a pom with no dependencies
|
|
pom {
|
|
licenses {
|
|
license {
|
|
name = 'The MIT License'
|
|
url = 'https://opensource.org/licenses/MIT'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|