160 lines
4.6 KiB
Groovy
160 lines
4.6 KiB
Groovy
buildscript {
|
|
ext.kotlin_version = '1.2.41'
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
plugins {
|
|
id 'com.github.ben-manes.versions' version '0.17.0'
|
|
id "io.spring.dependency-management" version "1.0.4.RELEASE"
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'io.spring.dependency-management'
|
|
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/' }
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7"
|
|
compile "org.jetbrains.kotlin:kotlin-reflect"
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
exceptionFormat = 'full'
|
|
}
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = 'javadoc'
|
|
from javadoc
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.jvmTarget = "1.6"
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.jvmTarget = "1.6"
|
|
}
|
|
|
|
artifacts {
|
|
archives javadocJar, sourcesJar
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes 'Implementation-Title': "Jabit ${project.name.capitalize()}",
|
|
'Implementation-Version': version
|
|
}
|
|
baseName "jabit-${project.name}"
|
|
}
|
|
|
|
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
|
|
|
|
dependencyManagement {
|
|
dependencies {
|
|
dependencySet(group: 'org.jetbrains.kotlin', version: "$kotlin_version") {
|
|
entry 'kotlin-stdlib-jdk7'
|
|
entry 'kotlin-reflect'
|
|
}
|
|
dependencySet(group: 'org.slf4j', version: '1.7.25') {
|
|
entry 'slf4j-api'
|
|
entry 'slf4j-simple'
|
|
}
|
|
|
|
dependency 'ch.dissem.msgpack:msgpack:2.0.1'
|
|
dependency 'org.bouncycastle:bcprov-jdk15on:1.59'
|
|
dependency 'com.madgag.spongycastle:prov:1.58.0.0'
|
|
dependency 'org.apache.commons:commons-text:1.2'
|
|
dependency 'org.flywaydb:flyway-core:5.0.7'
|
|
dependency 'com.beust:klaxon:2.1.7'
|
|
|
|
dependency 'args4j:args4j:2.33'
|
|
dependency 'org.ini4j:ini4j:0.5.4'
|
|
dependency 'com.h2database:h2:1.4.196'
|
|
|
|
dependency 'org.hamcrest:java-hamcrest:2.0.0.0'
|
|
dependency 'com.nhaarman:mockito-kotlin:1.5.0'
|
|
|
|
dependency 'org.junit.jupiter:junit-jupiter-api:5.2.0'
|
|
dependency 'org.junit.jupiter:junit-jupiter-engine:5.2.0'
|
|
}
|
|
}
|
|
}
|