mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
support Java Platform Module System (JPMS) (issue #1)
This commit is contained in:
@@ -24,5 +24,5 @@ deploy:
|
|||||||
skip_cleanup: true # to upload artifacts created during the build
|
skip_cleanup: true # to upload artifacts created during the build
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
jdk: openjdk8
|
jdk: openjdk11
|
||||||
tags: true
|
tags: true
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
FlatLaf Change Log
|
FlatLaf Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
- Added Java 9 module descriptor `module-info.class` to `flatlaf.jar` (in
|
||||||
|
`META-INF/versions/9`). But FlatLaf remains Java 8 compatible. (issue #1)
|
||||||
|
|
||||||
|
|
||||||
## 0.9
|
## 0.9
|
||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|||||||
@@ -26,7 +26,20 @@ repositories {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
|
||||||
|
sourceSets {
|
||||||
|
create( "main9" ) {
|
||||||
|
java {
|
||||||
|
setSrcDirs( listOf( "src/main9/java" ) )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 )
|
||||||
|
"main9Implementation"( files( sourceSets["main"].output.classesDirs ).builtBy( "compileJava" ) )
|
||||||
|
|
||||||
testImplementation( "com.miglayout:miglayout-swing:5.2" )
|
testImplementation( "com.miglayout:miglayout-swing:5.2" )
|
||||||
testImplementation( "com.jgoodies:jgoodies-forms:1.9.0" )
|
testImplementation( "com.jgoodies:jgoodies-forms:1.9.0" )
|
||||||
}
|
}
|
||||||
@@ -37,8 +50,30 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
|
||||||
|
named<JavaCompile>( "compileMain9Java" ) {
|
||||||
|
doFirst {
|
||||||
|
options.compilerArgs = listOf(
|
||||||
|
"--release", "9",
|
||||||
|
"--patch-module", "com.formdev.flatlaf=" + classpath.asPath
|
||||||
|
)
|
||||||
|
classpath = files()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
archiveBaseName.set( "flatlaf" )
|
archiveBaseName.set( "flatlaf" )
|
||||||
|
|
||||||
|
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
|
||||||
|
manifest.attributes(
|
||||||
|
"Multi-Release" to "true"
|
||||||
|
)
|
||||||
|
|
||||||
|
into( "META-INF/versions/9" ) {
|
||||||
|
from( sourceSets["main9"].output )
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
|
|||||||
27
flatlaf-core/src/main9/java/module-info.java
Normal file
27
flatlaf-core/src/main9/java/module-info.java
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
module com.formdev.flatlaf {
|
||||||
|
requires java.desktop;
|
||||||
|
|
||||||
|
exports com.formdev.flatlaf;
|
||||||
|
exports com.formdev.flatlaf.icons;
|
||||||
|
exports com.formdev.flatlaf.ui;
|
||||||
|
exports com.formdev.flatlaf.util;
|
||||||
|
}
|
||||||
@@ -42,6 +42,8 @@ tasks {
|
|||||||
attributes( "Main-Class" to "com.formdev.flatlaf.demo.FlatLafDemo" )
|
attributes( "Main-Class" to "com.formdev.flatlaf.demo.FlatLafDemo" )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exclude( "META-INF/versions/**" )
|
||||||
|
|
||||||
// include all dependencies in jar
|
// include all dependencies in jar
|
||||||
from( {
|
from( {
|
||||||
configurations.runtimeClasspath.get().filter { it.name.endsWith( "jar" ) }.map { zipTree( it ) }
|
configurations.runtimeClasspath.get().filter { it.name.endsWith( "jar" ) }.map { zipTree( it ) }
|
||||||
|
|||||||
Reference in New Issue
Block a user