diff --git a/flatlaf-extras/build.gradle.kts b/flatlaf-extras/build.gradle.kts index 740b63c3..6b7f89be 100644 --- a/flatlaf-extras/build.gradle.kts +++ b/flatlaf-extras/build.gradle.kts @@ -16,6 +16,7 @@ plugins { `java-library` + `flatlaf-module-info` `flatlaf-publish` } @@ -24,6 +25,10 @@ dependencies { implementation( "com.formdev:svgSalamander:1.1.2.1" ) } +flatlafModuleInfo { + dependsOn( ":flatlaf-core:jar" ) +} + java { withSourcesJar() withJavadocJar() diff --git a/flatlaf-extras/src/main/module-info/module-info.java b/flatlaf-extras/src/main/module-info/module-info.java new file mode 100644 index 00000000..0bcd09a6 --- /dev/null +++ b/flatlaf-extras/src/main/module-info/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright 2020 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 + * + * https://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.extras { + requires java.desktop; + requires static com.kitfox.svg; // optional at runtime + requires com.formdev.flatlaf; + + exports com.formdev.flatlaf.extras; +} diff --git a/flatlaf-swingx/build.gradle.kts b/flatlaf-swingx/build.gradle.kts index 92f486a3..bbe32652 100644 --- a/flatlaf-swingx/build.gradle.kts +++ b/flatlaf-swingx/build.gradle.kts @@ -16,6 +16,7 @@ plugins { `java-library` + `flatlaf-module-info` `flatlaf-publish` } @@ -24,6 +25,10 @@ dependencies { implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" ) } +flatlafModuleInfo { + dependsOn( ":flatlaf-core:jar" ) +} + java { withSourcesJar() withJavadocJar() diff --git a/flatlaf-swingx/src/main/module-info/module-info.java b/flatlaf-swingx/src/main/module-info/module-info.java new file mode 100644 index 00000000..36afe50d --- /dev/null +++ b/flatlaf-swingx/src/main/module-info/module-info.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 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 + * + * https://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.swingx { + requires java.desktop; + requires swingx.all; + requires com.formdev.flatlaf; + + exports com.formdev.flatlaf.swingx; + exports com.formdev.flatlaf.swingx.ui; + + // this allows com.formdev.flatlaf.FlatDefaultsAddon to read .properties files + opens com.formdev.flatlaf.swingx + to com.formdev.flatlaf; + + provides com.formdev.flatlaf.FlatDefaultsAddon + with com.formdev.flatlaf.swingx.FlatSwingXDefaultsAddon; + provides org.jdesktop.swingx.plaf.LookAndFeelAddons + with com.formdev.flatlaf.swingx.FlatLookAndFeelAddons; +}