Ascension/api/build.gradle

68 lines
1.5 KiB
Groovy
Raw Normal View History

2021-07-29 03:14:29 +02:00
apply from: rootProject.file('buildscript/relocations.gradle')
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
2024-07-26 22:38:56 +02:00
// Unrelocate
compileOnly(project(':common:common-unrelocate'))
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'
2024-11-16 23:30:09 +01:00
// v2
exclude module: 'slf4j-api'
2021-07-29 03:14:29 +02:00
}
2022-04-25 14:47:24 +02:00
api(libs.okhttp)
2024-11-16 23:30:09 +01:00
api(libs.slf4j.api)
2021-07-29 03:14:29 +02:00
}
// Relocations are in buildscript/api.gradle
sourceSets {
// Annotation Processor
2021-07-29 03:14:29 +02:00
ap {
java {
compileClasspath += sourceSets.main.compileClasspath + sourceSets.main.output
}
}
}
java {
withSourcesJar()
withJavadocJar()
}
2021-07-29 03:14:29 +02:00
jar {
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
}
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'
}
}
}
}
}
}