From 0aacceefed4984373ea04934b3483c64a00fc98f Mon Sep 17 00:00:00 2001 From: Thomas Peetz Date: Sat, 11 Jul 2020 14:41:01 +0200 Subject: [PATCH] initial Gradle build --- .gitattributes | 6 ++++ .gitignore | 3 ++ build.gradle | 29 +++++++++++++++++++ settings.gradle | 10 +++++++ .../java/com/ibtp/network/osi/Library.java | 10 +++++++ .../com/ibtp/network/osi/LibraryTest.java | 14 +++++++++ 6 files changed, 72 insertions(+) create mode 100644 .gitattributes create mode 100644 build.gradle create mode 100644 settings.gradle create mode 100644 src/main/java/com/ibtp/network/osi/Library.java create mode 100644 src/test/java/com/ibtp/network/osi/LibraryTest.java diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00a51af --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/.gitignore b/.gitignore index a1fc39c..821a4e0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ gradle-app.setting # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 # gradle/wrapper/gradle-wrapper.properties + +# Ignore Gradle build output directory +build diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..15952d8 --- /dev/null +++ b/build.gradle @@ -0,0 +1,29 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This generated file contains a sample Java Library project to get you started. + * For more details take a look at the Java Libraries chapter in the Gradle + * User Manual available at https://docs.gradle.org/6.3/userguide/java_library_plugin.html + */ + +plugins { + // Apply the java-library plugin to add support for Java Library + id 'java-library' +} + +repositories { + // Use jcenter for resolving dependencies. + // You can declare any Maven/Ivy/file repository here. + jcenter() +} + +dependencies { + // This dependency is exported to consumers, that is to say found on their compile classpath. + api 'org.apache.commons:commons-math3:3.6.1' + + // This dependency is used internally, and not exposed to consumers on their own compile classpath. + implementation 'com.google.guava:guava:28.2-jre' + + // Use JUnit test framework + testImplementation 'junit:junit:4.12' +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..8e7bbf6 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,10 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user manual at https://docs.gradle.org/6.3/userguide/multi_project_builds.html + */ + +rootProject.name = 'osi-stack' diff --git a/src/main/java/com/ibtp/network/osi/Library.java b/src/main/java/com/ibtp/network/osi/Library.java new file mode 100644 index 0000000..b555b0c --- /dev/null +++ b/src/main/java/com/ibtp/network/osi/Library.java @@ -0,0 +1,10 @@ +/* + * This Java source file was generated by the Gradle 'init' task. + */ +package com.ibtp.network.osi; + +public class Library { + public boolean someLibraryMethod() { + return true; + } +} diff --git a/src/test/java/com/ibtp/network/osi/LibraryTest.java b/src/test/java/com/ibtp/network/osi/LibraryTest.java new file mode 100644 index 0000000..d6fc097 --- /dev/null +++ b/src/test/java/com/ibtp/network/osi/LibraryTest.java @@ -0,0 +1,14 @@ +/* + * This Java source file was generated by the Gradle 'init' task. + */ +package com.ibtp.network.osi; + +import org.junit.Test; +import static org.junit.Assert.*; + +public class LibraryTest { + @Test public void testSomeLibraryMethod() { + Library classUnderTest = new Library(); + assertTrue("someLibraryMethod should return 'true'", classUnderTest.someLibraryMethod()); + } +}