Add maven publishing, now to add an actual maven host sometime...

This commit is contained in:
Julius de Jeu 2019-07-26 19:19:54 +02:00
parent 8f545c09a0
commit 414efe4123
2 changed files with 29 additions and 13 deletions

View file

@ -1,7 +1,7 @@
plugins { plugins {
id 'java' id 'java-library'
id 'org.jetbrains.kotlin.jvm' version '1.3.41' id 'org.jetbrains.kotlin.jvm' version '1.3.41'
id "com.jfrog.bintray" version "1.8.4" id 'maven-publish'
} }
group 'nl.voidcorp.depinj' group 'nl.voidcorp.depinj'
@ -27,15 +27,31 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
} }
bintray { task sourcesJar(type: Jar) {
user = System.getenv('BINTRAY_USER') from sourceSets.main.allJava
key = System.getenv('BINTRAY_KEY') archiveClassifier = 'sources'
pkg { }
repo = 'generic'
name = 'gradle-project'
userOrg = 'bintray_user'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/bintray/gradle-bintray-plugin.git'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
publishing {
publications {
maven(MavenPublication) {
artifactId = 'depinj'
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
} }

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists