mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-06 02:35:40 +08:00
100 lines
3.2 KiB
Groovy
100 lines
3.2 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'org.jetbrains.kotlin.jvm'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
sourceSets.main { java.srcDir("src/api/kotlin") }
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
}
|
|
|
|
javadoc {
|
|
options.addStringOption("charset", "UTF-8")
|
|
if (JavaVersion.current().isJava9Compatible()) options.addBooleanOption('html5', true)
|
|
}
|
|
|
|
kotlin {
|
|
sourceSets.main { kotlin.srcDir("src/api/kotlin") }
|
|
sourceSets {
|
|
all {
|
|
languageSettings {
|
|
optIn('com.highcapable.yukihookapi.annotation.YukiPrivateApi')
|
|
optIn('com.highcapable.yukihookapi.annotation.YukiGenerateApi')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
|
kotlinOptions {
|
|
jvmTarget = 11
|
|
freeCompilerArgs = [
|
|
'-opt-in=com.highcapable.yukihookapi.annotation.YukiPrivateApi',
|
|
'-opt-in=com.highcapable.yukihookapi.annotation.YukiGenerateApi',
|
|
'-Xno-param-assertions',
|
|
'-Xno-call-assertions',
|
|
'-Xno-receiver-assertions'
|
|
]
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Used 82 API Version
|
|
compileOnly 'de.robv.android.xposed:api:82'
|
|
compileOnly project(':yukihookapi-stub')
|
|
compileOnly fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation 'androidx.annotation:annotation:1.6.0'
|
|
}
|
|
|
|
group = rootProject.ext.maven.repository.groupId
|
|
version = rootProject.ext.maven.repository.apiVersion.name
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifactId = 'api'
|
|
from components.java
|
|
pom {
|
|
name = rootProject.ext.maven.repository.name
|
|
description = rootProject.ext.maven.repository.description
|
|
url = rootProject.ext.maven.repository.website
|
|
licenses {
|
|
license {
|
|
name = rootProject.ext.maven.repository.licence.name
|
|
url = rootProject.ext.maven.repository.licence.url
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = rootProject.ext.maven.developer.id
|
|
name = rootProject.ext.maven.developer.user
|
|
email = rootProject.ext.maven.developer.email
|
|
}
|
|
}
|
|
scm {
|
|
connection = rootProject.ext.maven.configurations.githubConnection
|
|
developerConnection = rootProject.ext.maven.configurations.githubDeveloperConnection
|
|
url = rootProject.ext.maven.configurations.githubUrl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
name = rootProject.ext.maven.configurations.ossName
|
|
url = rootProject.ext.maven.configurations.ossUrl
|
|
credentials {
|
|
def configs = getMavenCredentials(projectDir)
|
|
username = configs.username
|
|
password = configs.password
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing { sign(publishing.publications.mavenJava) } |