Attempt to publish ORX on Maven Central
This commit is contained in:
148
build.gradle
148
build.gradle
@@ -1,5 +1,3 @@
|
||||
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -34,6 +32,8 @@ def multiplatformModules = [
|
||||
"orx-quadtree",
|
||||
]
|
||||
|
||||
def doNotPublish = ["openrndr-demos"]
|
||||
|
||||
project.ext {
|
||||
kotlinApiVersion = '1.6'
|
||||
kotlinLanguageVersion = '1.6'
|
||||
@@ -47,14 +47,17 @@ project.ext {
|
||||
junitJupiterVersion = '5.7.1'
|
||||
}
|
||||
|
||||
def openrndrUseSnapshot = true
|
||||
|
||||
|
||||
|
||||
apply plugin: 'org.jetbrains.dokka'
|
||||
|
||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||
|
||||
def openrndrUseSnapshot = isReleaseVersion
|
||||
|
||||
project.ext {
|
||||
openrndrVersion = openrndrUseSnapshot? "0.5.1-SNAPSHOT" : "0.4.0"
|
||||
openrndrVersion = findProperty("openrndr.version")?.replace("v","") ?: "0.5.1-SNAPSHOT"
|
||||
jvmTarget = "1.8"
|
||||
kotlinVersion = "1.6.0"
|
||||
kotlinApiVersion = "1.4"
|
||||
@@ -181,20 +184,134 @@ task buildMainReadme {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
|
||||
// apply plugin: 'idea'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
configure(allprojects.findAll { !doNotPublish.contains(it.name) && (multiplatformModules.contains(it.name)) }) {
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
def fjdj = tasks.create("fakeJavaDocJar", Jar) {
|
||||
archiveClassifier = "javadoc"
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
all {
|
||||
pom {
|
||||
name = "$project.name"
|
||||
description = "$project.name"
|
||||
url = 'https://openrndr.org'
|
||||
developers {
|
||||
developer {
|
||||
id = 'edwinjakobs'
|
||||
name = 'Edwin Jakobs'
|
||||
email = 'edwin@openrndr.org'
|
||||
}
|
||||
}
|
||||
license {
|
||||
licenses {
|
||||
license {
|
||||
name = 'BSD-2-Clause'
|
||||
url = 'https://github.com/openrndr/openrndr/blob/master/LICENSE'
|
||||
distribution = 'repo'
|
||||
}
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = "scm:git:git@github.com:openrndr/openrndr.git"
|
||||
developerConnection = "scm:git:ssh://github.com/openrndr/openrndr.git"
|
||||
url = "https://github.com/openrndr/openrndr"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
credentials {
|
||||
username findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
|
||||
password findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
|
||||
}
|
||||
if (!isReleaseVersion) {
|
||||
url "https://s01.oss.sonatype.org/content/repositories/snapshots"
|
||||
} else {
|
||||
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
signing {
|
||||
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
configure(allprojects.findAll { !doNotPublish.contains(it.name) && !multiplatformModules.contains(it.name) }) {
|
||||
// apply plugin: 'idea'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'nebula.release'
|
||||
apply plugin: 'signing'
|
||||
|
||||
def proj = it
|
||||
println proj
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
groupId = "org.openrndr.extra"
|
||||
artifactId = "$project.name"
|
||||
description = "$project.name"
|
||||
pom {
|
||||
name = "$project.name"
|
||||
description = "$project.name"
|
||||
url = 'https://openrndr.org'
|
||||
developers {
|
||||
developer {
|
||||
id = 'edwinjakobs'
|
||||
name = 'Edwin Jakobs'
|
||||
email = 'edwin@openrndr.org'
|
||||
}
|
||||
}
|
||||
license {
|
||||
licenses {
|
||||
license {
|
||||
name = 'BSD-2-Clause'
|
||||
url = 'https://github.com/openrndr/orx/blob/master/LICENSE'
|
||||
distribution = 'repo'
|
||||
}
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = "scm:git:git@github.com:openrndr/orx.git"
|
||||
developerConnection = "scm:git:ssh://github.com/openrndr/orx.git"
|
||||
url = "https://github.com/openrndr/orx"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
credentials {
|
||||
username findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
|
||||
password findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
|
||||
}
|
||||
if (!isReleaseVersion) {
|
||||
url "https://s01.oss.sonatype.org/content/repositories/snapshots"
|
||||
} else {
|
||||
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
signing {
|
||||
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -214,6 +331,7 @@ configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
|
||||
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
|
||||
}
|
||||
|
||||
|
||||
test {
|
||||
useJUnitPlatform {
|
||||
includeEngines 'spek2'
|
||||
@@ -234,10 +352,10 @@ configure(allprojects.findAll { !multiplatformModules.contains(it.name) }) {
|
||||
}
|
||||
}
|
||||
|
||||
configure(allprojects.findAll { it.name != "openrndr-demos" }) {
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'nebula.release'
|
||||
}
|
||||
//configure(allprojects.findAll { it.name != "openrndr-demos" }) {
|
||||
// apply plugin: 'maven-publish'
|
||||
// apply plugin: 'nebula.release'
|
||||
//}
|
||||
|
||||
|
||||
//collectScreenshots.dependsOn {
|
||||
|
||||
Reference in New Issue
Block a user