111 lines
3.0 KiB
Groovy
111 lines
3.0 KiB
Groovy
buildscript {
|
|
ext.kotlin_version = '1.1.3'
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
plugins {
|
|
id 'com.github.ben-manes.versions' version '0.15.0'
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'signing'
|
|
apply plugin: 'jacoco'
|
|
apply plugin: 'gitflow-version'
|
|
apply plugin: 'com.github.ben-manes.versions'
|
|
|
|
sourceCompatibility = 1.7
|
|
targetCompatibility = 1.7
|
|
group = 'ch.dissem.jabit'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
|
}
|
|
dependencies {
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
|
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
exceptionFormat = 'full'
|
|
}
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = 'javadoc'
|
|
from javadoc
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
artifacts {
|
|
archives javadocJar, sourcesJar
|
|
}
|
|
|
|
signing {
|
|
required { isRelease && project.getProperties().get("signing.keyId")?.length() > 0 }
|
|
sign configurations.archives
|
|
}
|
|
|
|
uploadArchives {
|
|
repositories {
|
|
mavenDeployer {
|
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
|
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
}
|
|
|
|
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
}
|
|
|
|
pom.project {
|
|
name 'Jabit'
|
|
packaging 'jar'
|
|
url 'https://github.com/Dissem/Jabit'
|
|
|
|
scm {
|
|
connection 'scm:git:https://github.com/Dissem/Jabit.git'
|
|
developerConnection 'scm:git:git@github.com:Dissem/Jabit.git'
|
|
url 'https://github.com/Dissem/Jabit.git'
|
|
}
|
|
|
|
licenses {
|
|
license {
|
|
name 'The Apache License, Version 2.0'
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
name 'Christian Basler'
|
|
email 'chrigu.meyer@gmail.com'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
jacocoTestReport {
|
|
reports {
|
|
xml.enabled = true
|
|
html.enabled = true
|
|
}
|
|
}
|
|
|
|
check.dependsOn jacocoTestReport
|
|
}
|