2021-07-29 03:14:29 +02:00
|
|
|
apply from: rootProject.file('buildscript/relocations.gradle')
|
2022-06-09 18:29:21 +02:00
|
|
|
apply plugin: 'maven-publish'
|
2021-07-29 03:14:29 +02:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// Annotations
|
2022-04-22 19:56:11 +02:00
|
|
|
compileOnlyApi(libs.jetbrains.annotations)
|
2021-07-29 03:14:29 +02:00
|
|
|
|
|
|
|
// JDA
|
2022-04-22 19:56:11 +02:00
|
|
|
api(libs.jda) {
|
2021-07-29 03:14:29 +02:00
|
|
|
// We don't use audio
|
|
|
|
exclude module: 'opus-java'
|
|
|
|
}
|
2022-04-25 14:47:24 +02:00
|
|
|
api(libs.okhttp)
|
2021-07-29 03:14:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Relocations are in buildscript/api.gradle
|
|
|
|
|
|
|
|
sourceSets {
|
2024-07-07 12:29:01 +02:00
|
|
|
// Annotation Processor
|
2021-07-29 03:14:29 +02:00
|
|
|
ap {
|
|
|
|
java {
|
|
|
|
compileClasspath += sourceSets.main.compileClasspath + sourceSets.main.output
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-09 18:29:21 +02:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
|
|
|
|
2021-07-29 03:14:29 +02:00
|
|
|
jar {
|
2023-06-24 18:09:12 +02:00
|
|
|
from sourceSets.ap.output.classesDirs
|
|
|
|
from sourceSets.ap.output.resourcesDir
|
2021-07-29 03:14:29 +02:00
|
|
|
}
|
|
|
|
|
2024-06-23 15:58:27 +02:00
|
|
|
indraSpotlessLicenser {
|
2024-06-23 15:29:04 +02:00
|
|
|
// Overwrite the default
|
2024-06-23 15:58:27 +02:00
|
|
|
licenseHeaderFile(rootProject.file('buildscript/license/API_LICENSE_HEADER'))
|
2024-06-23 15:29:04 +02:00
|
|
|
}
|
2022-06-09 18:29:21 +02:00
|
|
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|