moved testing applications from src/test to new project flatlaf-testing (part 2)

This commit is contained in:
Karl Tauber
2019-10-23 16:44:39 +02:00
parent 62895a602f
commit 1de367e19e
16 changed files with 97 additions and 34 deletions

View File

@@ -34,11 +34,6 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
}
}
dependencies {
testImplementation( "com.miglayout:miglayout-swing:5.2" )
testImplementation( "com.jgoodies:jgoodies-forms:1.9.0" )
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
@@ -88,19 +83,6 @@ tasks {
from( javadoc )
}
register( "testJar", Jar::class ) {
archiveBaseName.set( "flatlaf-test" )
from( sourceSets.test.get().output )
}
}
configurations {
create( "testArtifacts" )
}
artifacts {
add( "testArtifacts", tasks.getByPath( "testJar" ) )
}
publishing {

View File

@@ -25,10 +25,6 @@ plugins {
dependencies {
implementation( project( ":flatlaf-core" ) )
implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" )
testImplementation( project( ":flatlaf-core", "testArtifacts" ) )
testImplementation( "org.swinglabs.swingx:swingx-beaninfo:1.6.5-1" )
testImplementation( "com.miglayout:miglayout-swing:5.2" )
}
java {
@@ -37,7 +33,6 @@ java {
}
tasks {
javadoc {
options {
this as StandardJavadocDocletOptions

View File

@@ -0,0 +1,36 @@
/*
* 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.
*/
version = rootProject.version
plugins {
`java-library`
}
dependencies {
implementation( project( ":flatlaf-core" ) )
implementation( project( ":flatlaf-swingx" ) )
implementation( "com.miglayout:miglayout-swing:5.2" )
implementation( "com.jgoodies:jgoodies-forms:1.9.0" )
implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" )
implementation( "org.swinglabs.swingx:swingx-beaninfo:1.6.5-1" )
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import javax.swing.*;
import net.miginfocom.swing.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import javax.swing.*;
import javax.swing.table.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import java.awt.*;
import javax.swing.*;

View File

@@ -2,7 +2,7 @@
* Created by JFormDesigner on Tue Aug 27 21:47:02 CEST 2019
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import java.awt.*;
import javax.swing.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import java.awt.Color;
import java.awt.Component;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import java.awt.Component;
import java.awt.Container;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import java.awt.*;
import java.awt.event.MouseAdapter;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import java.awt.*;
import java.awt.event.ComponentAdapter;
@@ -28,6 +28,11 @@ import javax.swing.*;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
import com.formdev.flatlaf.FlatDarculaLaf;
import com.formdev.flatlaf.FlatDarkLaf;
import com.formdev.flatlaf.FlatIntelliJLaf;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.FlatLightLaf;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
package com.formdev.flatlaf;
package com.formdev.flatlaf.testing;
import com.formdev.flatlaf.FlatLaf;
/**
* A Flat LaF that has a test color scheme.

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
package com.formdev.flatlaf.testing.swingx;
import java.io.InputStream;
import com.formdev.flatlaf.FlatDefaultsAddon;
/**
* SwingX addon for FlatLaf for testing.
*
* @author Karl Tauber
*/
public class FlatSwingXDefaultsTestAddon
extends FlatDefaultsAddon
{
/**
* Finds SwingX addon .properties file for the given LaF class
* in the same package as this class.
*/
@Override
public InputStream getDefaults( Class<?> lafClass ) {
Class<?> addonClass = this.getClass();
String propertiesName = "/" + addonClass.getPackage().getName().replace( '.', '/' )
+ '/' + lafClass.getSimpleName() + ".properties";
return addonClass.getResourceAsStream( propertiesName );
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.formdev.flatlaf.swingx;
package com.formdev.flatlaf.testing.swingx;
import java.awt.*;
import java.util.Calendar;
@@ -22,7 +22,7 @@ import java.util.Date;
import javax.swing.*;
import net.miginfocom.swing.*;
import org.jdesktop.swingx.*;
import com.formdev.flatlaf.FlatTestFrame;
import com.formdev.flatlaf.testing.FlatTestFrame;
/**
* @author Karl Tauber

View File

@@ -0,0 +1 @@
com.formdev.flatlaf.testing.swingx.FlatSwingXDefaultsTestAddon

View File

@@ -19,3 +19,4 @@ rootProject.name = "FlatLaf"
include( "flatlaf-core" )
include( "flatlaf-swingx" )
include( "flatlaf-demo" )
include( "flatlaf-testing" )