mirror of
https://github.com/HighCapable/YukiReflection.git
synced 2025-09-07 11:09:52 +08:00
Initial commit
This commit is contained in:
90
yukireflection/build.gradle
Normal file
90
yukireflection/build.gradle
Normal file
@@ -0,0 +1,90 @@
|
||||
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.yukireflection.annotation.YukiPrivateApi') } } }
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = 11
|
||||
freeCompilerArgs = [
|
||||
'-opt-in=com.highcapable.yukireflection.annotation.YukiPrivateApi',
|
||||
'-Xno-param-assertions',
|
||||
'-Xno-call-assertions',
|
||||
'-Xno-receiver-assertions'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.annotation:annotation:1.5.0'
|
||||
}
|
||||
|
||||
group = rootProject.ext.groupId
|
||||
version = rootProject.ext.apiVersion
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = 'api'
|
||||
from components.java
|
||||
pom {
|
||||
name = rootProject.ext.repoName
|
||||
description = rootProject.ext.repoDescription
|
||||
url = rootProject.ext.website
|
||||
licenses {
|
||||
license {
|
||||
name = rootProject.ext.licenceName
|
||||
url = rootProject.ext.licenceUrl
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = rootProject.ext.devId
|
||||
name = rootProject.ext.devUser
|
||||
email = rootProject.ext.userEmail
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = rootProject.ext.githubConnection
|
||||
developerConnection = rootProject.ext.githubDeveloperConnection
|
||||
url = rootProject.ext.githubUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
name = rootProject.ext.ossName
|
||||
url = rootProject.ext.ossUrl
|
||||
credentials {
|
||||
username = getFileContent("OSSRH_USERNAME")
|
||||
password = getFileContent("OSSRH_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
sign(publishing.publications.mavenJava)
|
||||
}
|
Reference in New Issue
Block a user