2021-01-20 04:29:08 +01:00
|
|
|
plugins {
|
|
|
|
id 'java-library'
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
|
|
|
|
2021-01-28 20:42:29 +01:00
|
|
|
apply plugin: 'java'
|
2021-01-25 05:48:14 +01:00
|
|
|
apply plugin: 'eclipse'
|
2021-06-22 15:15:10 +02:00
|
|
|
apply plugin: 'maven'
|
2021-01-25 05:48:14 +01:00
|
|
|
|
2021-01-28 20:42:29 +01:00
|
|
|
repositories {
|
2021-06-22 15:15:10 +02:00
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
url = "https://maven.speiger.com/repository/main"
|
2021-01-28 20:42:29 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-27 17:17:51 +02:00
|
|
|
archivesBaseName = 'Primitive Collections'
|
2021-06-24 13:17:48 +02:00
|
|
|
version = '0.3.1-SNAPSHOT';
|
2021-04-27 17:17:51 +02:00
|
|
|
|
2021-01-28 20:42:29 +01:00
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
|
2021-04-22 23:02:04 +02:00
|
|
|
javadoc {
|
|
|
|
options.tags = [ "implSpec", "note" ]
|
|
|
|
}
|
|
|
|
|
2021-01-20 04:29:08 +01:00
|
|
|
eclipse {
|
|
|
|
classpath {
|
|
|
|
downloadJavadoc = true
|
|
|
|
downloadSources = true
|
2021-01-28 20:42:29 +01:00
|
|
|
file {
|
|
|
|
whenMerged {
|
|
|
|
//Enforce a custom container and allowing access to the sun.misc package which is nessesary for EnumMaps
|
|
|
|
entries.find{ it.kind == 'con' && it.path.startsWith('org.eclipse.jdt')}.path = 'org.eclipse.jdt.launching.JRE_CONTAINER';
|
|
|
|
}
|
|
|
|
}
|
2021-01-20 04:29:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-22 23:02:04 +02:00
|
|
|
compileJava {
|
|
|
|
options.compilerArgs << '-XDignore.symbol.file'
|
2021-06-22 16:13:01 +02:00
|
|
|
options.fork = true
|
2021-04-22 23:02:04 +02:00
|
|
|
options.forkOptions.executable = 'javac' // may not needed on 1.8
|
|
|
|
}
|
|
|
|
|
2021-01-29 11:41:48 +01:00
|
|
|
sourceSets {
|
|
|
|
builder
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
builderCompile.extendsFrom compile
|
2021-01-20 04:29:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-06-23 00:23:08 +02:00
|
|
|
compile 'de.speiger:Simple-Code-Generator:1.0.4'
|
2021-01-20 04:29:08 +01:00
|
|
|
testImplementation 'junit:junit:4.12'
|
|
|
|
}
|
|
|
|
|
2021-01-29 11:41:48 +01:00
|
|
|
task generateSource(type: JavaExec) {
|
|
|
|
group = 'internal'
|
|
|
|
description = 'Builds the sourcecode'
|
|
|
|
classpath = sourceSets.builder.runtimeClasspath
|
|
|
|
main = 'speiger.src.builder.PrimitiveCollectionsBuilder'
|
|
|
|
}
|
|
|
|
|
2021-06-23 19:58:31 +02:00
|
|
|
task forceGenerateSource(type: JavaExec) {
|
|
|
|
group = 'internal'
|
|
|
|
description = 'Builds the sourcecode forceful'
|
|
|
|
classpath = sourceSets.builder.runtimeClasspath
|
|
|
|
main = 'speiger.src.builder.PrimitiveCollectionsBuilder'
|
|
|
|
args = ['true']
|
|
|
|
}
|
|
|
|
|
2021-01-29 11:41:48 +01:00
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
from javadoc
|
|
|
|
classifier = 'javadoc'
|
|
|
|
}
|
|
|
|
|
|
|
|
task srcJar(type: Jar) {
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
classifier = 'sources'
|
|
|
|
}
|
|
|
|
|
|
|
|
javadoc.failOnError = false
|
2021-04-25 21:37:22 +02:00
|
|
|
javadoc.options.memberLevel = JavadocMemberLevel.PUBLIC
|
2021-04-22 23:02:04 +02:00
|
|
|
javadoc.options.quiet()
|
2021-01-29 11:41:48 +01:00
|
|
|
|
|
|
|
artifacts {
|
2021-04-25 03:45:57 +02:00
|
|
|
archives javadocJar
|
2021-01-29 11:41:48 +01:00
|
|
|
archives srcJar
|
|
|
|
}
|
|
|
|
|
2021-01-20 04:29:08 +01:00
|
|
|
test {
|
|
|
|
useJUnit()
|
2021-06-22 15:15:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
uploadArchives {
|
|
|
|
repositories.mavenDeployer {
|
|
|
|
repository(url: 'https://maven.speiger.com/repository/main') {
|
|
|
|
authentication(userName: project.properties.mavenUser, password: project.properties.mavenPassword)
|
|
|
|
}
|
|
|
|
snapshotRepository(url: 'https://maven.speiger.com/repository/main') {
|
|
|
|
authentication(userName: project.properties.mavenUser, password: project.properties.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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-01-20 04:29:08 +01:00
|
|
|
}
|