34 Star 152 Fork 24

cloudopt / cloudopt-next

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 4.87 KB
一键复制 编辑 原始数据 按行查看 历史
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.6.0"
id "org.jetbrains.dokka" version "1.4.30"
}
allprojects {
group = "net.cloudopt.next"
version = property("project_version")
sourceCompatibility = property("java_version")
repositories {
mavenCentral()
}
}
subprojects {
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${property('kotlin_version')}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${property('kotlin_version')}"
classpath "org.jetbrains.kotlin:kotlin-noarg:${property('kotlin_version')}"
}
}
test {
useJUnitPlatform()
}
apply plugin: "java"
apply plugin: "kotlin"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "org.jetbrains.dokka"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${property('kotlin_version')}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${property('kotlin_version')}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${property('kotlinx_version')}"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${property('kotlinx_version')}"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${property('dokka_version')}"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.0"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.6.0"
}
compileJava {
sourceCompatibility = rootProject.property("java_version")
targetCompatibility = rootProject.property("java_version")
[compileJava]*.options*.encoding = "UTF-8"
}
compileTestJava {
sourceCompatibility = rootProject.property("java_version")
targetCompatibility = rootProject.property("java_version")
[compileTestJava]*.options*.encoding = "UTF-8"
}
compileKotlin {
kotlinOptions.jvmTarget = rootProject.property("java_version")
}
compileTestKotlin {
kotlinOptions.jvmTarget = rootProject.property("java_version")
}
dokkaJavadoc {
outputDirectory.set(new File(buildDir, "javadoc"))
}
java {
withJavadocJar()
withSourcesJar()
}
if (
project.name != "plugins"
) {
plugins.withId("maven-publish") {
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.group + ":" + project.name
url = "https://github.com/cloudoptlab/cloudopt-next"
afterEvaluate {
// description is not available until evaluated.
description = project.description
}
scm {
connection = "scm:git:https://github.com/cloudoptlab/cloudopt-next.git"
developerConnection = "scm:git:git@github.com:cloudoptlab/cloudopt-next.git"
url = "https://github.com/cloudoptlab/cloudopt-next"
}
licenses {
license {
name = "Apache 2.0"
url = "https://opensource.org/licenses/Apache-2.0"
}
}
developers {
developer {
id = "cloudopt.net"
name = "Cloudopt"
email = "support@cloudopt.net"
url = "https://www.cloudopt.net/"
organization = "Cloudopt"
organizationUrl = "https://www.cloudopt.net/"
}
}
}
}
}
repositories {
maven {
def releaseUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotUrl : releaseUrl
credentials {
username findProperty("sonatypeUsername") as String
password findProperty("sonatypePassword") as String
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
}
}
Kotlin
1
https://gitee.com/cloudopt/cloudopt-next.git
git@gitee.com:cloudopt/cloudopt-next.git
cloudopt
cloudopt-next
cloudopt-next
master

搜索帮助