120 lines
2.5 KiB
Groovy
120 lines
2.5 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'maven'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
url = "https://maven.speiger.com/repository/main"
|
|
}
|
|
}
|
|
|
|
archivesBaseName = 'Primitive Collections'
|
|
version = '0.5.3';
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
javadoc {
|
|
options.tags = [ "implSpec", "note" ]
|
|
}
|
|
|
|
eclipse {
|
|
classpath {
|
|
downloadJavadoc = true
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
builder
|
|
}
|
|
|
|
configurations {
|
|
builderCompile.extendsFrom compile
|
|
}
|
|
|
|
dependencies {
|
|
builderCompile 'de.speiger:Simple-Code-Generator:1.0.5'
|
|
runtimeOnly 'de.speiger:Simple-Code-Generator:1.0.5'
|
|
testImplementation 'junit:junit:4.12'
|
|
testImplementation 'com.google.guava:guava-testlib:31.0.1-jre'
|
|
}
|
|
|
|
task generateSource(type: JavaExec) {
|
|
group = 'internal'
|
|
description = 'Builds the sourcecode'
|
|
classpath = sourceSets.builder.runtimeClasspath
|
|
main = 'speiger.src.builder.PrimitiveCollectionsBuilder'
|
|
}
|
|
|
|
task forceGenerateSource(type: JavaExec) {
|
|
group = 'internal'
|
|
description = 'Builds the sourcecode forceful'
|
|
classpath = sourceSets.builder.runtimeClasspath
|
|
main = 'speiger.src.builder.PrimitiveCollectionsBuilder'
|
|
args = ['true']
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
from javadoc
|
|
classifier = 'javadoc'
|
|
}
|
|
|
|
task srcJar(type: Jar) {
|
|
from sourceSets.main.allSource
|
|
classifier = 'sources'
|
|
}
|
|
|
|
javadoc.failOnError = false
|
|
javadoc.options.memberLevel = JavadocMemberLevel.PUBLIC
|
|
javadoc.options.quiet()
|
|
|
|
artifacts {
|
|
archives javadocJar
|
|
archives srcJar
|
|
}
|
|
|
|
test {
|
|
useJUnit()
|
|
}
|
|
|
|
uploadArchives {
|
|
Properties props = new Properties()
|
|
props.load(new FileInputStream("$buildDir/credentials.properties"))
|
|
repositories.mavenDeployer {
|
|
repository(url: 'https://maven.speiger.com/repository/main') {
|
|
authentication(userName: props.mavenUser, password: props.mavenPassword)
|
|
}
|
|
snapshotRepository(url: 'https://maven.speiger.com/repository/main') {
|
|
authentication(userName: props.mavenUser, password: props.mavenPassword)
|
|
}
|
|
pom {
|
|
version = project.version
|
|
artifactId = project.archivesBaseName.replace(" ", "-")
|
|
groupId = 'de.speiger'
|
|
project {
|
|
licenses {
|
|
license {
|
|
name = 'The Apache License, Version 2.0'
|
|
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = 'speiger'
|
|
name = 'Speiger'
|
|
email = 'speiger@gmx.net'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |