wip JPMS support

This commit is contained in:
Robinson 2021-04-26 14:45:02 +02:00
parent 56f9338e56
commit 86a0909489
4 changed files with 128 additions and 97 deletions

88
LICENSE
View File

@ -116,17 +116,13 @@
Copyright 2020 Copyright 2020
Square, Inc Square, Inc
- JNA - Simplified native library access for Java. - Kotlin -
[The Apache Software License, Version 2.0] [The Apache Software License, Version 2.0]
https://github.com/twall/jna https://github.com/JetBrains/kotlin
Copyright 2021 Copyright 2020
Timothy Wall 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
- JNA-Platform - Mappings for a number of commonly used platform functions See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
[The Apache Software License, Version 2.0]
https://github.com/twall/jna
Copyright 2021
Timothy Wall
- Java Uuid Generator - A set of Java classes for working with UUIDs - Java Uuid Generator - A set of Java classes for working with UUIDs
[The Apache Software License, Version 2.0] [The Apache Software License, Version 2.0]
@ -160,6 +156,12 @@
Copyright 2021 Copyright 2021
Jonathan Halterman and friends Jonathan Halterman and friends
- kotlinx.coroutines - Library support for Kotlin coroutines with multiplatform support
[The Apache Software License, Version 2.0]
https://github.com/Kotlin/kotlinx.coroutines
Copyright 2021
JetBrains s.r.o.
- SLF4J - Simple facade or abstraction for various logging frameworks - SLF4J - Simple facade or abstraction for various logging frameworks
[MIT License] [MIT License]
http://www.slf4j.org http://www.slf4j.org
@ -173,6 +175,21 @@
Lasse Collin Lasse Collin
Igor Pavlov Igor Pavlov
- Updates - Software Update Management
[The Apache Software License, Version 2.0]
https://git.dorkbox.com/dorkbox/Updates
Copyright 2021
Dorkbox LLC
Extra license information
- Kotlin -
[The Apache Software License, Version 2.0]
https://github.com/JetBrains/kotlin
Copyright 2020
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
- Executor - Shell, JVM, and SSH command execution on Linux, MacOS, or Windows for Java 8+ - Executor - Shell, JVM, and SSH command execution on Linux, MacOS, or Windows for Java 8+
[The Apache Software License, Version 2.0] [The Apache Software License, Version 2.0]
https://git.dorkbox.com/dorkbox/Executor https://git.dorkbox.com/dorkbox/Executor
@ -192,30 +209,20 @@
Copyright 2014 Copyright 2014
The Apache Software Foundation The Apache Software Foundation
- Kotlin -
[The Apache Software License, Version 2.0]
https://github.com/JetBrains/kotlin
Copyright 2020
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
- Logback - Logback is a logging framework for Java applications - Logback - Logback is a logging framework for Java applications
[The Apache Software License, Version 2.0] [The Apache Software License, Version 2.0]
http://logback.qos.ch http://logback.qos.ch
Copyright 2021 Copyright 2021
QOS.ch QOS.ch
- kotlinx.coroutines - Library support for Kotlin coroutines with multiplatform support
[The Apache Software License, Version 2.0]
https://github.com/Kotlin/kotlinx.coroutines
Copyright 2021
JetBrains s.r.o.
- kotlin-logging - Lightweight logging framework for Kotlin
[The Apache Software License, Version 2.0]
https://github.com/MicroUtils/kotlin-logging
Copyright 2021
Ohad Shai
- SLF4J - Simple facade or abstraction for various logging frameworks
[MIT License]
http://www.slf4j.org
Copyright 2021
QOS.ch
- SSHJ - SSHv2 library for Java - SSHJ - SSHv2 library for Java
[The Apache Software License, Version 2.0] [The Apache Software License, Version 2.0]
https://github.com/hierynomus/sshj https://github.com/hierynomus/sshj
@ -250,6 +257,25 @@
https://github.com/str4d/ed25519-java https://github.com/str4d/ed25519-java
https://github.com/str4d https://github.com/str4d
- kotlinx.coroutines - Library support for Kotlin coroutines with multiplatform support
[The Apache Software License, Version 2.0]
https://github.com/Kotlin/kotlinx.coroutines
Copyright 2021
JetBrains s.r.o.
- SLF4J - Simple facade or abstraction for various logging frameworks
[MIT License]
http://www.slf4j.org
Copyright 2021
QOS.ch
- Updates - Software Update Management
[The Apache Software License, Version 2.0]
https://git.dorkbox.com/dorkbox/Updates
Copyright 2021
Dorkbox LLC
Extra license information
- Kotlin - - Kotlin -
[The Apache Software License, Version 2.0] [The Apache Software License, Version 2.0]
https://github.com/JetBrains/kotlin https://github.com/JetBrains/kotlin
@ -282,9 +308,3 @@
http://www.slf4j.org http://www.slf4j.org
Copyright 2021 Copyright 2021
QOS.ch QOS.ch
- PropertyLoader - Property annotation and loader for fields
[The Apache Software License, Version 2.0]
https://git.dorkbox.com/dorkbox/PropertyLoader
Copyright 2021
Dorkbox LLC

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import dorkbox.gradle.kotlin
import java.time.Instant import java.time.Instant
/////////////////////////////// ///////////////////////////////
@ -27,19 +26,19 @@ gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS // always show th
gradle.startParameter.warningMode = WarningMode.All gradle.startParameter.warningMode = WarningMode.All
plugins { plugins {
id("com.dorkbox.GradleUtils") version "1.16" id("com.dorkbox.GradleUtils") version "2.6"
id("com.dorkbox.Licensing") version "2.5.5" id("com.dorkbox.Licensing") version "2.6"
id("com.dorkbox.VersionUpdate") version "2.1" id("com.dorkbox.VersionUpdate") version "2.3"
id("com.dorkbox.GradlePublish") version "1.10" id("com.dorkbox.GradlePublish") version "1.11"
kotlin("jvm") version "1.4.31" kotlin("jvm") version "1.4.32"
} }
object Extras { object Extras {
// set for the project // set for the project
const val description = "Utilities for use within Java projects" const val description = "Utilities for use within Java projects"
const val group = "com.dorkbox" const val group = "com.dorkbox"
const val version = "1.9" const val version = "1.10"
// set as project.ext // set as project.ext
const val name = "Utilities" const val name = "Utilities"
@ -57,10 +56,9 @@ object Extras {
///// assign 'Extras' ///// assign 'Extras'
/////////////////////////////// ///////////////////////////////
GradleUtils.load("$projectDir/../../gradle.properties", Extras) GradleUtils.load("$projectDir/../../gradle.properties", Extras)
GradleUtils.fixIntellijPaths() GradleUtils.defaults()
GradleUtils.defaultResolutionStrategy()
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8) GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8)
//GradleUtils.jpms(JavaVersion.VERSION_1_9)
licensing { licensing {
license(License.APACHE_2) { license(License.APACHE_2) {
@ -170,43 +168,6 @@ licensing {
} }
} }
sourceSets {
main {
java {
setSrcDirs(listOf("src"))
// want to include java files for the source. 'setSrcDirs' resets includes...
include("**/*.java")
}
// kotlin {
// setSrcDirs(listOf("src"))
//
// // want to include kotlin files for the source. 'setSrcDirs' resets includes...
// include("**/*.kt")
// }
}
test {
java {
setSrcDirs(listOf("test"))
// want to include java files for the source. 'setSrcDirs' resets includes...
include("**/*.java")
}
kotlin {
setSrcDirs(listOf("test"))
// want to include java files for the source. 'setSrcDirs' resets includes...
include("**/*.java", "**/*.kt")
}
}
}
repositories {
mavenLocal() // this must be first!
jcenter()
}
tasks.jar.get().apply { tasks.jar.get().apply {
manifest { manifest {
// https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html // https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html
@ -219,8 +180,6 @@ tasks.jar.get().apply {
attributes["Implementation-Title"] = "${Extras.group}.${Extras.id}" attributes["Implementation-Title"] = "${Extras.group}.${Extras.id}"
attributes["Implementation-Version"] = Extras.buildDate attributes["Implementation-Version"] = Extras.buildDate
attributes["Implementation-Vendor"] = Extras.vendor attributes["Implementation-Vendor"] = Extras.vendor
attributes["Automatic-Module-Name"] = Extras.id
} }
} }
@ -229,15 +188,15 @@ tasks.jar.get().apply {
dependencies { dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Extras.coroutineVer}") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Extras.coroutineVer}")
implementation("com.dorkbox:Executor:3.0") implementation("com.dorkbox:Updates:1.1")
implementation("com.dorkbox:SwtJavaFx:1.1") implementation("com.dorkbox:Executor:3.2")
implementation("com.dorkbox:PropertyLoader:1.0") implementation("com.dorkbox:SwtJavaFx:1.2")
val jnaVersion = "5.6.0" val jnaVersion = "5.8.0"
compileOnly("net.java.dev.jna:jna:$jnaVersion") compileOnly("net.java.dev.jna:jna-jpms:$jnaVersion")
compileOnly("net.java.dev.jna:jna-platform:$jnaVersion") compileOnly("net.java.dev.jna:jna-platform-jpms:$jnaVersion")
implementation("org.slf4j:slf4j-api:1.7.30") implementation("org.slf4j:slf4j-api:1.8.0-beta4")
implementation("org.tukaani:xz:1.9") implementation("org.tukaani:xz:1.9")
compileOnly("com.fasterxml.uuid:java-uuid-generator:4.0.1") compileOnly("com.fasterxml.uuid:java-uuid-generator:4.0.1")
@ -274,7 +233,7 @@ dependencies {
testImplementation("com.dorkbox:Serializers:1.0") testImplementation("com.dorkbox:Serializers:1.0")
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
testImplementation("ch.qos.logback:logback-classic:1.2.3") testImplementation("ch.qos.logback:logback-classic:1.3.0-alpha4")
} }
publishToSonatype { publishToSonatype {

15
gradle.properties Normal file
View File

@ -0,0 +1,15 @@
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
org.gradle.jvmargs=-Dfile.encoding=UTF-8
#org.gradle.warning.mode=(all,fail,none,summary)
org.gradle.warning.mode=all
#org.gradle.daemon=false
# default is 3 hours, this is 1 minute
org.gradle.daemon.idletimeout=60000
#org.gradle.console=(auto,plain,rich,verbose)
org.gradle.console=auto
#org.gradle.logging.level=(quiet,warn,lifecycle,info,debug)
org.gradle.logging.level=lifecycle

37
src9/module-info.java Normal file
View File

@ -0,0 +1,37 @@
module dorkbox.utilities {
exports dorkbox.exit;
exports dorkbox.jna;
exports dorkbox.jna.linux;
exports dorkbox.jna.linux.structs;
exports dorkbox.jna.macos;
exports dorkbox.jna.macos.cocoa;
exports dorkbox.jna.macos.foundation;
exports dorkbox.jna.windows;
exports dorkbox.jna.windows.structs;
exports dorkbox.os;
exports dorkbox.urlHandler;
exports dorkbox.util;
exports dorkbox.util.classes;
exports dorkbox.util.collections;
exports dorkbox.util.crypto;
exports dorkbox.util.crypto.signers;
exports dorkbox.util.entropy;
exports dorkbox.util.exceptions;
exports dorkbox.util.gwt;
exports dorkbox.util.properties;
exports dorkbox.util.swing;
exports dorkbox.util.userManagement;
requires dorkbox.executor;
requires dorkbox.updates;
requires static dorkbox.swtjavafx;
requires static com.sun.jna;
requires static com.sun.jna.platform;
requires static org.slf4j;
requires static java.desktop;
requires java.base;
requires kotlin.stdlib;
}