seeseemelk/MockBukkit

View on GitHub
build.gradle

Summary

Maintainability
Test Coverage
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'signing'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    jcenter()

    maven {
        url 'https://hub.spigotmc.org/nexus/content/repositories/public/'
    }

    maven {
        url 'https://repo.md-5.net/content/groups/public/'
    }
}

dependencies {
    api 'org.bukkit:bukkit:1.15.2-R0.1-SNAPSHOT'
    implementation 'junit:junit:4.12'
    implementation 'org.hamcrest:hamcrest-library:1.3'
    implementation 'org.apache.commons:commons-io:1.3.2'
    implementation 'org.jetbrains:annotations:19.0.0'
}

task javadocJar(type: Jar) {
    classifier = 'javadoc'
    from javadoc
}

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

artifacts {
    archives javadocJar, sourcesJar
}

signing {
    sign publishing.publications
}

jacocoTestReport {
    reports {
        xml.enabled true
    }
}

group = 'com.github.seeseemelk'
version = '0.3.1-SNAPSHOT'

publishing {
    publications {
        mockBukkit(MavenPublication) {
            artifactId = 'MockBukkit-v1.15'
            from components.java
            pom {
                name = 'MockBukkit-v1.15'
                packaging = 'jar'
                description = 'MockBukkit is a mocking framework for bukkit to allow the easy unit testing of Bukkit plugins.'
                url = 'https://github.com/seeseemelk/MockBukkit'
                scm {
                    connection = 'scm:git:git://github.com/seeseemelk/MockBukkit.git'
                    developerConnection = 'scm:git:ssh://github.com:seeseemelk/MockBukkit.git'
                    url = 'https://github.com/seeseemelk/MockBukkit/tree/v1.15-spigot'
                }
                licenses {
                    license {
                        name = 'MIT License'
                        url = 'https://github.com/seeseemelk/MockBukkit/blob/v1.15/LICENSE'
                    }
                }
                developers {
                    developer {
                        id = 'seeseemelk'
                        name = 'Sebastiaan de Schaetzen'
                        email = 'sebastiaan.de.schaetzen@gmail.com'
                    }
                }
            }
        }
    }

    repositories {
        maven {
            name = 'repository'
            url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
            credentials {
                username = findProperty('ossrhUsername')
                password = findProperty('ossrhPassword')
            }
        }
        maven {
            name = 'snapshotRepository'
            url = 'https://oss.sonatype.org/content/repositories/snapshots/'
            credentials {
                username = findProperty('ossrhUsername')
                password = findProperty('ossrhPassword')
            }
        }
    }
}

eclipse.classpath.downloadJavadoc = true
eclipse.classpath.downloadSources = true