From f77b7a487605e5ba03ff8d51b2a2a441d052781c Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 21 Feb 2019 08:58:55 +0300 Subject: [PATCH] Build an readme update for 0.1.0-dev --- .gitignore | 3 ++- README.md | 4 ++-- build.gradle.kts | 25 +++++++++++++++++++++++-- settings.gradle.kts | 2 +- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index e91684008..6e66dc376 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ # Cache of project .gradletasknamecache -artifactory.gradle \ No newline at end of file +gradle/artifactory.gradle +gradle/bintray.gradle \ No newline at end of file diff --git a/README.md b/README.md index 9dd62a21e..9a86514f4 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,13 @@ repositories { Then use a regular dependency like so: ```groovy -compile(group: 'scientifik', name: 'kmath-core', version: '0.0.1-SNAPSHOT') +api "scientifik:kmath-core-jvm:0.1.0-dev" ``` or in the Gradle Kotlin DSL: ```kotlin -compile(group = "scientifik", name = "kmath-core", version = "0.0.1-SNAPSHOT") +api("scientifik:kmath-core-jvm:0.1.0-dev") ``` Working builds can be obtained here: [![](https://jitpack.io/v/altavir/kmath.svg)](https://jitpack.io/#altavir/kmath). diff --git a/build.gradle.kts b/build.gradle.kts index ac434506f..350156420 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,7 @@ buildscript { dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") classpath("org.jfrog.buildinfo:build-info-extractor-gradle:4+") + classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4") } } @@ -49,8 +50,28 @@ allprojects { } } } + + extensions.findByType()?.apply { + val javadocJar by tasks.creating(Jar::class) { + archiveClassifier.value("javadoc") + // TODO: instead of a single empty Javadoc JAR, generate real documentation for each module + } + + val sourcesJar by tasks.creating(Jar::class) { + archiveClassifier.value("sources") + } + + repositories { + maven(uri("$buildDir/repo")) + } + publications.withType().all { + artifact(javadocJar) + artifact(sourcesJar) + } + //apply(from = "${rootProject.rootDir}/gradle/bintray.gradle") + } } -if (file("artifactory.gradle").exists()) { - apply(from = "artifactory.gradle") +if (file("gradle/artifactory.gradle").exists()) { + apply(from = "gradle/artifactory.gradle") } diff --git a/settings.gradle.kts b/settings.gradle.kts index 8684de3ee..7e815354e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,7 +15,7 @@ pluginManagement { } } -enableFeaturePreview("GRADLE_METADATA") +//enableFeaturePreview("GRADLE_METADATA") rootProject.name = "kmath" include(