Newer
Older
simple-database-kotlin / build.gradle
rnentjes on 28 Apr 2019 2 KB Update version
group 'nl.astraeus'
version '2.0.5'

apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'findbugs'
apply plugin: 'maven-publish'

repositories {
    mavenCentral()
    maven {
        url "http://nexus.astraeus.nl/nexus/content/groups/public"
    }
}

buildscript {
    ext.kotlin_version = '1.2.30'
    repositories {
        maven {
            url "http://nexus.astraeus.nl/nexus/content/groups/public"
        }
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
    testCompile "com.h2database:h2:1.4.+"

    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    compile "nl.astraeus:simple-database:2.0.4"
}

/*
uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "http://nexus.astraeus.nl/nexus/content/repositories/releases") {
                authentication(userName: nexusUsername, password: nexusPassword)
            }
            snapshotRepository(url: "http://nexus.astraeus.nl/nexus/content/repositories/snapshots") {
                authentication(userName: nexusUsername, password: nexusPassword)
            }
        }
    }
}
*/

findbugs {
    ignoreFailures = true
}

javadoc {
    failOnError = false
}

task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = 'sources'
    from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives sourcesJar
    archives javadocJar
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
    }
}

task fatJar(type: Jar) {
    manifest {
        attributes 'Implementation-Title': 'simple-database-kotlin',
                'Implementation-Version': version
    }
    baseName = project.name + '-nodep'
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}