-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from cloudoptlab/3.x
3.0.0.0-BETA7
- Loading branch information
Showing
40 changed files
with
607 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
plugins { | ||
id "java" | ||
id "org.jetbrains.kotlin.jvm" version "1.4.0" | ||
id "com.jfrog.bintray" version "1.8.4" | ||
id("org.jetbrains.dokka") version "1.4.30" | ||
} | ||
|
||
allprojects { | ||
group = "net.cloudopt.next" | ||
version = property("project_version") | ||
sourceCompatibility = property("java_version") as Integer | ||
sourceCompatibility = property("java_version") | ||
repositories { | ||
maven { url "http://maven.aliyun.com/nexus/content/repositories/central/" } | ||
maven { url "https://maven.aliyun.com/nexus/content/repositories/central/" } | ||
maven { url "https://maven.aliyun.com/nexus/content/groups/public" } | ||
mavenCentral() | ||
jcenter() | ||
} | ||
} | ||
|
||
subprojects { | ||
|
||
buildscript { | ||
repositories { | ||
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } | ||
gradlePluginPortal() | ||
} | ||
dependencies { | ||
|
@@ -34,62 +35,106 @@ subprojects { | |
} | ||
|
||
apply plugin: "java" | ||
apply plugin: "maven-publish" | ||
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-stdlib:${property('kotlinx_version')}" | ||
implementation "org.jetbrains.kotlin:kotlin-reflect:${property('kotlin_version')}" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${property('kotlin_version')}" | ||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${property('kotlin_version')}" | ||
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${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") as String | ||
kotlinOptions.jvmTarget = rootProject.property("java_version") | ||
kotlinOptions.useIR = true | ||
} | ||
compileTestKotlin { | ||
kotlinOptions.jvmTarget = rootProject.property("java_version") as String | ||
kotlinOptions.jvmTarget = rootProject.property("java_version") | ||
kotlinOptions.useIR = true | ||
} | ||
|
||
task sourceJar(type: Jar, dependsOn: classes) { from sourceSets.main.allSource } | ||
|
||
apply plugin: "maven-publish" | ||
apply plugin: "com.jfrog.bintray" | ||
dokkaJavadoc{ | ||
outputDirectory.set(new File(buildDir, "javadoc")) | ||
} | ||
|
||
publishing { | ||
publications { | ||
Publication(MavenPublication) { | ||
groupId 'net.cloudopt.next' | ||
artifactId "$project.name" | ||
version "${property('project_version')}" // This is defined on the subproject | ||
from components.java | ||
artifact sourceJar { | ||
classifier "sources" | ||
} | ||
} | ||
} | ||
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:[email protected]: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" | ||
} | ||
} | ||
|
||
bintray { | ||
user = System.getenv("BINTRAY_USER") | ||
key = System.getenv("BINTRAY_KEY") | ||
pkg { | ||
repo = "maven" | ||
name = project.name | ||
userOrg = "cloudopt" | ||
licenses = ["Apache-2.0"] | ||
vcsUrl = "https://github.com/cloudoptlab/cloudopt-next.git" | ||
version { | ||
name = "${property('project_version')}" | ||
developers { | ||
developer { | ||
id = "cloudopt.net" | ||
name = "Cloudopt" | ||
email = "[email protected]" | ||
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 | ||
} | ||
} | ||
} | ||
} | ||
publications = ['Publication'] | ||
publish = true | ||
} | ||
signing { | ||
sign publishing.publications.mavenJava | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.