diff --git a/.travis.yml b/.travis.yml index b959a1c..16e2fe2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,10 @@ cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ + +deploy: + provider: script + script: ./gradlew :core:bintrayUpload :android:bintrayUpload + skip_cleanup: true + on: + branch: master diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 04a5e07..de1ea0d 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -1,10 +1,14 @@ +import com.jfrog.bintray.gradle.BintrayExtension.PackageConfig +import com.jfrog.bintray.gradle.BintrayExtension.VersionConfig import org.jetbrains.dokka.gradle.DokkaTask plugins { id("org.jetbrains.dokka") id("digital.wup.android-maven-publish") version "3.6.2" id("com.android.library") + id("com.jfrog.bintray") kotlin("android") + `maven-publish` } apply(from = "../publishing.gradle.kts") @@ -53,7 +57,7 @@ val javaDoc by tasks.registering(Jar::class) { publishing { publications { - register("mavenAar", MavenPublication::class) { + create("katana-android") { from(components["android"]) artifact(sourcesJar.get()) artifact(javaDoc.get()) @@ -62,3 +66,25 @@ publishing { } } } + +bintray { + user = System.getenv("BINTRAY_USER") + key = System.getenv("BINTRAY_API_KEY") + override = false + publish = true + + setPublications("katana-android") + + pkg(delegateClosureOf { + repo = "katana" + name = "katana-android" + userOrg = "rewe-digital" + websiteUrl = "https://github.com/rewe-digital-incubator/katana" + vcsUrl = "https://github.com/rewe-digital-incubator/katana" + setLicenses("MIT") + + version(delegateClosureOf { + name = "${project.version}" + }) + }) +} diff --git a/build.gradle.kts b/build.gradle.kts index 2202635..33dd77a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,6 +16,7 @@ plugins { kotlin("jvm") version "1.3.11" apply false `maven-publish` id("org.jetbrains.dokka") version "0.9.17" + id("com.jfrog.bintray") version "1.8.4" } allprojects { @@ -31,17 +32,3 @@ allprojects { kotlinOptions.jvmTarget = "1.6" } } - -subprojects { - apply { - plugin("org.gradle.maven-publish") - } - - publishing { - repositories { - maven { - // TODO - } - } - } -} diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 44fb6b3..33d783a 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,8 +1,12 @@ +import com.jfrog.bintray.gradle.BintrayExtension.PackageConfig +import com.jfrog.bintray.gradle.BintrayExtension.VersionConfig import org.jetbrains.dokka.gradle.DokkaTask plugins { + id("com.jfrog.bintray") id("org.jetbrains.dokka") kotlin("jvm") + `maven-publish` } apply(from = "../publishing.gradle.kts") @@ -48,7 +52,7 @@ val javaDoc by tasks.registering(Jar::class) { publishing { publications { - register("mavenJava", MavenPublication::class) { + create("katana-core") { from(components["java"]) artifact(sourcesJar.get()) artifact(javaDoc.get()) @@ -57,3 +61,25 @@ publishing { } } } + +bintray { + user = System.getenv("BINTRAY_USER") + key = System.getenv("BINTRAY_API_KEY") + override = false + publish = true + + setPublications("katana-core") + + pkg(delegateClosureOf { + repo = "katana" + name = "katana-core" + userOrg = "rewe-digital" + websiteUrl = "https://github.com/rewe-digital-incubator/katana" + vcsUrl = "https://github.com/rewe-digital-incubator/katana" + setLicenses("MIT") + + version(delegateClosureOf { + name = "${project.version}" + }) + }) +}