Updated build/plugins. license has kotlin as 1980 since that is when the interior files (for that jar) are published. We use the self-published date for license information

This commit is contained in:
nathan 2020-08-18 22:25:21 +02:00
parent 36e2641537
commit 1187f5dd88
2 changed files with 172 additions and 220 deletions

56
LICENSE
View File

@ -133,10 +133,17 @@
Copyright 2019
Timothy Wall
- Java Uuid Generator - A set of Java classes for working with UUIDs
[The Apache Software License, Version 2.0]
https://github.com/cowtowncoder/java-uuid-generator
Copyright 2020
Tatu Saloranta (tatu.saloranta@iki.fi)
Contributors. See source release-notes/CREDITS
- Kryo - Fast and efficient binary object graph serialization framework for Java
[BSD 3-Clause License]
https://github.com/EsotericSoftware/kryo
Copyright 2019
Copyright 2020
Nathan Sweet
Extra license information
@ -162,32 +169,6 @@
Martin Grotzke
Rafael Winterhalter
- Eclipse Platform - Frameworks and common services to support the use of Eclipse and it's tools (SWT)
[Eclipse Public License (EPL)]
https://projects.eclipse.org/projects/eclipse.platform
Copyright 2019
The Eclipse Foundation, Inc.
- SLF4J - Simple facade or abstraction for various logging frameworks
[MIT License]
http://www.slf4j.org
Copyright 2019
QOS.ch
- XZ for Java - Complete implementation of XZ data compression in pure Java
[Public Domain, per Creative Commons CC0]
https://tukaani.org/xz/java.html
Copyright 2018
Lasse Collin
Igor Pavlov
- Java Uuid Generator - A set of Java classes for working with UUIDs
[The Apache Software License, Version 2.0]
https://github.com/cowtowncoder/java-uuid-generator
Copyright 2020
Tatu Saloranta (tatu.saloranta@iki.fi)
Contributors. See source release-notes/CREDITS
- Netty - An event-driven asynchronous network application framework
[The Apache Software License, Version 2.0]
https://netty.io
@ -213,6 +194,25 @@
Copyright 2020
Jonathan Halterman and friends
- Eclipse Platform - Frameworks and common services to support the use of Eclipse and it's tools (SWT)
[Eclipse Public License (EPL)]
https://projects.eclipse.org/projects/eclipse.platform
Copyright 2019
The Eclipse Foundation, Inc.
- SLF4J - Simple facade or abstraction for various logging frameworks
[MIT License]
http://www.slf4j.org
Copyright 2019
QOS.ch
- XZ for Java - Complete implementation of XZ data compression in pure Java
[Public Domain, per Creative Commons CC0]
https://tukaani.org/xz/java.html
Copyright 2018
Lasse Collin
Igor Pavlov
- Executor - Shell, JVM, and SSH command execution on Linux, MacOS, or Windows for Java 11+
[The Apache Software License, Version 2.0]
https://git.dorkbox.com/dorkbox/Executor
@ -235,7 +235,7 @@
- Kotlin -
[The Apache Software License, Version 2.0]
https://github.com/JetBrains/kotlin
Copyright 2020
Copyright 1980
JetBrains s.r.o. and Kotlin Programming Language contributors
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md

View File

@ -15,7 +15,6 @@
*/
import java.time.Instant
import kotlin.collections.set
///////////////////////////////
////// PUBLISH TO SONATYPE / MAVEN CENTRAL
@ -23,23 +22,23 @@ import kotlin.collections.set
////// RELEASE : (to sonatype/maven central), <'publish and release' - 'publishToSonatypeAndRelease'>
///////////////////////////////
gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS // always show the stacktrace!
gradle.startParameter.warningMode = WarningMode.All
plugins {
java
id("com.dorkbox.GradleUtils") version "1.8"
id("com.dorkbox.CrossCompile") version "1.0.1"
id("com.dorkbox.Licensing") version "1.4"
id("com.dorkbox.VersionUpdate") version "1.4.1"
id("com.dorkbox.GradlePublish") version "1.2"
kotlin("jvm") version "1.3.72"
id("com.dorkbox.GradleUtils") version "1.10"
id("com.dorkbox.Licensing") version "2.2"
id("com.dorkbox.VersionUpdate") version "2.0"
id("com.dorkbox.GradlePublish") version "1.6"
}
object Extras {
// set for the project
const val description = "Utilities for use within Java projects"
const val group = "com.dorkbox"
const val version = "1.5.8"
const val version = "1.6"
// set as project.ext
const val name = "Utilities"
@ -47,9 +46,8 @@ object Extras {
const val vendor = "Dorkbox LLC"
const val vendorUrl = "https://dorkbox.com"
const val url = "https://git.dorkbox.com/dorkbox/Utilities"
val buildDate = Instant.now().toString()
val JAVA_VERSION = JavaVersion.VERSION_1_6.toString()
val buildDate = Instant.now().toString()
}
///////////////////////////////
@ -57,121 +55,119 @@ object Extras {
///////////////////////////////
GradleUtils.load("$projectDir/../../gradle.properties", Extras)
GradleUtils.fixIntellijPaths()
GradleUtils.defaultResolutionStrategy()
GradleUtils.compileConfiguration(JavaVersion.VERSION_11)
licensing {
license(License.APACHE_2) {
description(Extras.description)
author(Extras.vendor)
url(Extras.url)
note(Extras.description)
}
license("MersenneTwisterFast", License.BSD_3) {
copyright(2003)
author("Sean Luke")
author("Michael Lecuyer (portions Copyright 1993")
url(Extras.url)
}
license("FileUtil (code from FilenameUtils.java for normalize + dependencies)", License.APACHE_2) {
copyright(2013)
author("The Apache Software Foundation")
author("Kevin A. Burton")
author("Scott Sanders")
author("Daniel Rall")
author("Christoph.Reck")
author("Peter Donald")
author("Jeff Turner")
author("Matthew Hawthorne")
author("Martin Cooper")
author("Jeremias Maerki")
author("Stephen Colebourne")
url(Extras.url)
url("http://commons.apache.org/proper/commons-io/")
}
license("FastThreadLocal", License.BSD_3) {
copyright(2014)
author("Lightweight Java Game Library Project")
author("Riven")
url(Extras.url)
url("https://github.com/LWJGL/lwjgl3/blob/5819c9123222f6ce51f208e022cb907091dd8023/modules/core/src/main/java/org/lwjgl/system/FastThreadLocal.java")
url("https://github.com/riven8192/LibStruct/blob/master/src/net/indiespot/struct/runtime/FastThreadLocal.java")
}
license("Base64Fast", License.BSD_3) {
copyright(2004)
author("Mikael Grev, MiG InfoCom AB. (base64@miginfocom.com)")
url(Extras.url)
url("http://migbase64.sourceforge.net/")
}
license("BCrypt", License.BSD_2) {
copyright(2006)
author("Damien Miller (djm@mindrot.org)")
note("GWT modified version")
url(Extras.url)
url("http://www.mindrot.org/projects/jBCrypt")
}
license("Bias, BinarySearch", License.MIT) {
copyright(2013)
author("Tim Boudreau")
url(Extras.url)
url("https://github.com/timboudreau/util")
}
license("ConcurrentEntry", License.APACHE_2) {
copyright(2016)
author("bennidi")
author("dorkbox")
url(Extras.url)
}
license("Byte Utils (UByte, UInteger, ULong, Unsigned, UNumber, UShort)", License.APACHE_2) {
copyright(2017)
author("Data Geekery GmbH (http://www.datageekery.com)")
author("Lukas Eder")
author("Ed Schaller")
author("Jens Nerche")
author("Ivan Sokolov")
url(Extras.url)
url("https://github.com/jOOQ/jOOQ/tree/master/jOOQ/src/main/java/org/jooq/types")
}
license("Collection Utilities (Array, ArrayMap, BooleanArray, ByteArray, CharArray, FloatArray, IdentityMap, IntArray, IntFloatMap, IntIntMap, IntMap, IntSet, LongArray, LongMap, ObjectFloatMap, ObjectIntMap, ObjectMap, ObjectSet, OrderedMap, OrderedSet)", License.APACHE_2) {
copyright(2011)
author("LibGDX")
author("Mario Zechner (badlogicgames@gmail.com)")
author("Nathan Sweet (nathan.sweet@gmail.com)")
url(Extras.url)
url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
}
license("Predicate", License.APACHE_2) {
copyright(2011)
author("LibGDX")
author("Mario Zechner (badlogicgames@gmail.com)")
author("Nathan Sweet (nathan.sweet@gmail.com)")
author("xoppa")
url(Extras.url)
url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
}
license("Select, QuickSelect", License.APACHE_2) {
copyright(2011)
author("LibGDX")
author("Mario Zechner (badlogicgames@gmail.com)")
author("Nathan Sweet (nathan.sweet@gmail.com)")
author("Jon Renner")
url(Extras.url)
url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
}
license("TimSort, ComparableTimSort", License.APACHE_2) {
copyright(2008)
author("The Android Open Source Project")
url(Extras.url)
url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
extra("MersenneTwisterFast", License.BSD_3) {
it.url(Extras.url)
it.copyright(2003)
it.author("Sean Luke")
it.author("Michael Lecuyer (portions Copyright 1993")
}
extra("FileUtil (code from FilenameUtils.java for normalize + dependencies)", License.APACHE_2) {
it.url(Extras.url)
it.url("http://commons.apache.org/proper/commons-io/")
it.copyright(2013)
it.author("The Apache Software Foundation")
it.author("Kevin A. Burton")
it.author("Scott Sanders")
it.author("Daniel Rall")
it.author("Christoph.Reck")
it.author("Peter Donald")
it.author("Jeff Turner")
it.author("Matthew Hawthorne")
it.author("Martin Cooper")
it.author("Jeremias Maerki")
it.author("Stephen Colebourne")
}
extra("FastThreadLocal", License.BSD_3) {
it.url(Extras.url)
it.url("https://github.com/LWJGL/lwjgl3/blob/5819c9123222f6ce51f208e022cb907091dd8023/modules/core/src/main/java/org/lwjgl/system/FastThreadLocal.java")
it.url("https://github.com/riven8192/LibStruct/blob/master/src/net/indiespot/struct/runtime/FastThreadLocal.java")
it.copyright(2014)
it.author("Lightweight Java Game Library Project")
it.author("Riven")
}
extra("Base64Fast", License.BSD_3) {
it.url(Extras.url)
it.url("http://migbase64.sourceforge.net/")
it.copyright(2004)
it.author("Mikael Grev, MiG InfoCom AB. (base64@miginfocom.com)")
}
extra("BCrypt", License.BSD_2) {
it.url(Extras.url)
it.url("http://www.mindrot.org/projects/jBCrypt")
it.copyright(2006)
it.author("Damien Miller (djm@mindrot.org)")
it.note("GWT modified version")
}
extra("Bias, BinarySearch", License.MIT) {
it.url(Extras.url)
it.url("https://github.com/timboudreau/util")
it.copyright(2013)
it.author("Tim Boudreau")
}
extra("ConcurrentEntry", License.APACHE_2) {
it.url(Extras.url)
it.copyright(2016)
it.author("bennidi")
it.author("dorkbox")
}
extra("Byte Utils (UByte, UInteger, ULong, Unsigned, UNumber, UShort)", License.APACHE_2) {
it.url(Extras.url)
it.url("https://github.com/jOOQ/jOOQ/tree/master/jOOQ/src/main/java/org/jooq/types")
it.copyright(2017)
it.author("Data Geekery GmbH (http://www.datageekery.com)")
it.author("Lukas Eder")
it.author("Ed Schaller")
it.author("Jens Nerche")
it.author("Ivan Sokolov")
}
extra("Collection Utilities (Array, ArrayMap, BooleanArray, ByteArray, CharArray, FloatArray, IdentityMap, IntArray, IntFloatMap, IntIntMap, IntMap, IntSet, LongArray, LongMap, ObjectFloatMap, ObjectIntMap, ObjectMap, ObjectSet, OrderedMap, OrderedSet)", License.APACHE_2) {
it.url(Extras.url)
it.url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
it.copyright(2011)
it.author("LibGDX")
it.author("Mario Zechner (badlogicgames@gmail.com)")
it.author("Nathan Sweet (nathan.sweet@gmail.com)")
}
extra("Predicate", License.APACHE_2) {
it.url(Extras.url)
it.url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
it.copyright(2011)
it.author("LibGDX")
it.author("Mario Zechner (badlogicgames@gmail.com)")
it.author("Nathan Sweet (nathan.sweet@gmail.com)")
it.author("xoppa")
}
extra("Select, QuickSelect", License.APACHE_2) {
it.url(Extras.url)
it.url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
it.copyright(2011)
it.author("LibGDX")
it.author("Mario Zechner (badlogicgames@gmail.com)")
it.author("Nathan Sweet (nathan.sweet@gmail.com)")
it.author("Jon Renner")
}
extra("TimSort, ComparableTimSort", License.APACHE_2) {
it.url(Extras.url)
it.url("https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils")
it.copyright(2008)
it.author("The Android Open Source Project")
}
extra("Modified hex conversion utility methods", License.APACHE_2) {
it.url(Extras.url)
it.url("https://netty.io")
it.copyright(2014)
it.author("The Netty Project")
}
}
}
@ -200,20 +196,6 @@ repositories {
jcenter()
}
///////////////////////////////
////// Task defaults
///////////////////////////////
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = Extras.JAVA_VERSION
targetCompatibility = Extras.JAVA_VERSION
}
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.FAIL
}
tasks.jar.get().apply {
manifest {
// https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html
@ -231,82 +213,52 @@ tasks.jar.get().apply {
}
}
tasks.compileJava.get().apply {
println("\tCompiling classes to Java $sourceCompatibility")
}
fun getSwtMavenName(): String {
val currentOS = org.gradle.internal.os.OperatingSystem.current()
val platform = when {
currentOS.isWindows -> "win32"
currentOS.isMacOsX -> "macosx"
else -> "linux"
}
var arch = System.getProperty("os.arch")
arch = when {
arch.matches(".*64.*".toRegex()) -> "x86_64"
else -> "x86"
}
// because the eclipse release of SWT is abandoned on maven, this MAVEN repo has newer version of SWT,
// https://github.com/maven-eclipse/maven-eclipse.github.io for the website about it
// http://maven-eclipse.github.io/maven for the maven repo
return "org.eclipse.swt.gtk.$platform.$arch"
}
// NOTE: compileOnly is used because there are some classes/dependencies that ARE NOT necessary to be included, UNLESS the user
// is actually using that part of the library. If this happens, they will (or should) already be using the dependency)
dependencies {
api("com.dorkbox:JnaUtilities:1.1")
compileOnly("com.dorkbox:Executor:1.1")
val jnaVersion = "5.5.0"
api("net.java.dev.jna:jna:$jnaVersion")
api("net.java.dev.jna:jna-platform:$jnaVersion")
compileOnly("net.java.dev.jna:jna:$jnaVersion")
compileOnly("net.java.dev.jna:jna-platform:$jnaVersion")
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("com.github.jponge:lzma-java:1.3")
implementation("com.fasterxml.uuid:java-uuid-generator:3.3.0")
implementation("org.tukaani:xz:1.8")
compileOnly("com.fasterxml.uuid:java-uuid-generator:4.0.1")
// api "com.koloboke:koloboke-api-jdk8:1.0.0"
// runtime "com.koloboke:koloboke-impl-jdk8:1.0.0"
implementation("com.esotericsoftware:kryo:5.0.0-RC2")
// api("com.esotericsoftware:kryo:4.0.2")
// api("de.javakaffee:kryo-serializers:0.45")
compileOnly("com.esotericsoftware:kryo:5.0.0-RC8")
compileOnly("de.javakaffee:kryo-serializers:0.45")
implementation("io.netty:netty-all:4.1.49.Final")
compileOnly("io.netty:netty-buffer:4.1.51.Final")
val bcVersion = "1.64"
implementation("org.bouncycastle:bcprov-jdk15on:$bcVersion")
implementation("org.bouncycastle:bcpg-jdk15on:$bcVersion")
implementation("org.bouncycastle:bcmail-jdk15on:$bcVersion")
implementation("org.bouncycastle:bctls-jdk15on:$bcVersion")
val bcVersion = "1.66"
compileOnly("org.bouncycastle:bcprov-jdk15on:$bcVersion")
compileOnly("org.bouncycastle:bcpg-jdk15on:$bcVersion")
compileOnly("org.bouncycastle:bcmail-jdk15on:$bcVersion")
compileOnly("org.bouncycastle:bctls-jdk15on:$bcVersion")
implementation("org.lwjgl:lwjgl-xxhash:3.2.3")
implementation("org.javassist:javassist:3.26.0-GA")
implementation("com.dorkbox:ShellExecutor:1.1")
compileOnly("org.lwjgl:lwjgl-xxhash:3.2.3")
implementation("net.jodah:typetools:0.6.2")
compileOnly("net.jodah:typetools:0.6.2")
// because the eclipse release of SWT is sPecIaL!
compileOnly(GradleUtils.getSwtMavenId("3.113.0")) {
isTransitive = false
}
implementation("com.koloboke:koloboke-impl-jdk8:1.0.0")
// testing
testImplementation("org.bouncycastle:bcprov-jdk15on:$bcVersion")
testImplementation("org.bouncycastle:bcpg-jdk15on:$bcVersion")
testImplementation("org.bouncycastle:bcmail-jdk15on:$bcVersion")
testImplementation("org.bouncycastle:bctls-jdk15on:$bcVersion")
// because the eclipse release of SWT is abandoned on maven, this repo has a newer version of SWT,
// http://maven-eclipse.github.io/maven
// 4.4 is the oldest version that works with us. We use reflection to access SWT, so we can compile the project without needing SWT
// compileOnly("org.eclipse.platform:${getSwtMavenName()}:3.113.0") {
//// compileOnly("org.eclipse.platform:org.eclipse.swt.gtk.linux.x86_64:3.113.0") {
// isTransitive = false
// }
testImplementation("com.esotericsoftware:kryo:5.0.0-RC2")
testImplementation("de.javakaffee:kryo-serializers:0.45")
// compileOnly(group = "org.openjfx", name = "javafx", version = "12", ext = "javafx-base")
// compileOnly(group = "org.openjfx", name = "javafx", version = "12", ext = "pom")
// unit testing
testImplementation("junit:junit:4.13")
testImplementation("ch.qos.logback:logback-classic:1.2.3")
}