This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5bc0d1
commit 31336ff
Showing
3 changed files
with
110 additions
and
51 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 +1 @@ | ||
VERSION=0.0.1 | ||
VERSION=0.1.0 |
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
buildscript { | ||
ext."signing.keyId" = System.getenv("SIGNING_KEYID") | ||
ext."signing.password" = System.getenv("SIGNING_PASSWORD") | ||
ext."signing.secretKeyRingFile" = System.getenv("SIGNING_KEYRING") | ||
} | ||
|
||
def getDeployVersion() { | ||
return project.findProperty('DEPLOY_VERSION') ?: VERSION | ||
} | ||
|
||
group 'com.autodesk' | ||
version getDeployVersion() | ||
|
||
def isReleaseBuild() { | ||
return VERSION.contains('SNAPSHOT') == false | ||
} | ||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL : | ||
'https://oss.sonatype.org/service/local/staging/deploy/maven2/' | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL : | ||
'https://oss.sonatype.org/content/repositories/snapshots/' | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return System.getenv('SONATYPE_USERNAME') ?: '' | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return System.getenv('SONATYPE_PASSWORD') ?: '' | ||
} | ||
|
||
task emptySourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
} | ||
|
||
//task javadocsJar(type: Jar, dependsOn: dokka) { | ||
// classifier = 'javadoc' | ||
// from dokka.outputDirectory | ||
//} | ||
|
||
publishing { | ||
publications { | ||
all { | ||
groupId = group | ||
version getDeployVersion() | ||
pom.withXml { | ||
def root = asNode() | ||
root.children().last() + { | ||
resolveStrategy = Closure.DELEGATE_FIRST | ||
|
||
description 'Native coroutine-based workers' | ||
name project.name | ||
url 'https://github.com/autodesk/coroutineworker' | ||
scm { | ||
url 'https://github.com/autodesk/coroutineworker' | ||
connection 'scm:git:git://github.com/autodesk/coroutineworker.git' | ||
developerConnection 'scm:git:ssh://git@github.com/autodesk/coroutineworker.git' | ||
} | ||
developers { | ||
developer { | ||
id 'autodesk' | ||
name 'Autodesk' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
publications.getByName('kotlinMultiplatform') { | ||
// Source jars are only created for platforms, not the common artifact. | ||
artifact emptySourcesJar | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
url isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl() | ||
credentials { | ||
username getRepositoryUsername() | ||
password getRepositoryPassword() | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseBuild() } | ||
sign(publishing.publications) | ||
} | ||
|
||
tasks.register('publishMac') { | ||
dependsOn 'publishIosArm64PublicationToMavenRepository' | ||
dependsOn 'publishIosX64PublicationToMavenRepository' | ||
dependsOn 'publishJvmPublicationToMavenRepository' | ||
dependsOn 'publishMetadataPublicationToMavenRepository' | ||
dependsOn 'publishKotlinMultiplatformPublicationToMavenRepository' | ||
} | ||
|
||
tasks.register('publishWindows') { | ||
dependsOn 'publishMingwX64PublicationToMavenRepository' | ||
} |