From 840c3698ad28e7b14a4265df04c5d68838f3cd6d Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 19 Aug 2019 14:07:09 +0200 Subject: [PATCH] gradle build scripts added --- .gitignore | 8 ++++---- build.gradle.kts | 29 +++++++++++++++++++++++++++++ flatlaf-core/build.gradle.kts | 32 ++++++++++++++++++++++++++++++++ settings.gradle.kts | 19 +++++++++++++++++++ 4 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 build.gradle.kts create mode 100644 flatlaf-core/build.gradle.kts create mode 100644 settings.gradle.kts diff --git a/.gitignore b/.gitignore index 88ec30e7..34002bf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ -/bin/ -/build/ -/.gradle/ +bin/ +build/ +.gradle/ .classpath .project .settings/ .idea/ -/out/ +out/ *.iml *.ipr *.iws diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..00bd9250 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,29 @@ +/* + * 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 = "0.1" + +// check required Java version +if( JavaVersion.current() < JavaVersion.VERSION_1_8 ) + throw RuntimeException( "Java 8 or later required (running ${System.getProperty( "java.version" )})" ) + +// log version, Gradle and Java versions +println() +println( "-------------------------------------------------------------------------------" ) +println( "FlatLaf Version: ${version}" ) +println( "Gradle ${gradle.gradleVersion} at ${gradle.gradleHomeDir}" ) +println( "Java ${System.getProperty( "java.version" )}" ) +println() diff --git a/flatlaf-core/build.gradle.kts b/flatlaf-core/build.gradle.kts new file mode 100644 index 00000000..8a12d5c8 --- /dev/null +++ b/flatlaf-core/build.gradle.kts @@ -0,0 +1,32 @@ +/* + * 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` +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +tasks { + jar { + archiveBaseName.set( "flatlaf" ) + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..8a14cef8 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,19 @@ +/* + * 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. + */ + +rootProject.name = "FlatLaf" + +include( "flatlaf-core" )