From f6ed3eb6905c999f2c774433905de44051701ba2 Mon Sep 17 00:00:00 2001 From: Lars Ivar Hatledal Date: Wed, 2 Oct 2019 09:50:40 +0200 Subject: [PATCH] Update build files --- java/fmi4j/build.gradle | 10 +--------- java/fmi4j/fmi-export/build.gradle | 6 ++++-- java/fmi4j/fmi-import/build.gradle | 1 + java/fmi4j/fmu-driver/build.gradle | 1 + java/fmi4j/fmu-slaves/build.gradle | 4 +++- java/fmi4j/gradle/log4j.gradle | 8 ++++++++ 6 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 java/fmi4j/gradle/log4j.gradle diff --git a/java/fmi4j/build.gradle b/java/fmi4j/build.gradle index 1c803be3..bee0a48a 100644 --- a/java/fmi4j/build.gradle +++ b/java/fmi4j/build.gradle @@ -13,7 +13,7 @@ wrapper { subprojects { sub -> group = 'no.ntnu.ihb.fmi4j' - version = '0.24.1' + version = '0.24.2' pluginManager.withPlugin('java') { @@ -21,14 +21,6 @@ subprojects { sub -> mavenCentral() } - dependencies { - - def slf4j_version = '1.7.25' - implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4j_version - runtimeOnly group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4j_version - - } - pluginManager.withPlugin('kotlin') { compileKotlin { diff --git a/java/fmi4j/fmi-export/build.gradle b/java/fmi4j/fmi-export/build.gradle index d5692bdc..378429b6 100644 --- a/java/fmi4j/fmi-export/build.gradle +++ b/java/fmi4j/fmi-export/build.gradle @@ -13,13 +13,15 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - compile project(':fmi-md') + api project(':fmi-md') } jar { from { - configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + configurations.compile.collect { + it.isDirectory() ? it : zipTree(it) + } } } diff --git a/java/fmi4j/fmi-import/build.gradle b/java/fmi4j/fmi-import/build.gradle index 0663d48e..59689420 100644 --- a/java/fmi4j/fmi-import/build.gradle +++ b/java/fmi4j/fmi-import/build.gradle @@ -6,6 +6,7 @@ plugins { apply plugin: 'kotlin' +apply from: rootProject.file("gradle/log4j.gradle") apply from: rootProject.file("gradle/junit.gradle") apply from: rootProject.file("gradle/copyfmus.gradle") apply from: rootProject.file("gradle/mavenpublish.gradle") diff --git a/java/fmi4j/fmu-driver/build.gradle b/java/fmi4j/fmu-driver/build.gradle index 09d5a845..687bebb6 100644 --- a/java/fmi4j/fmu-driver/build.gradle +++ b/java/fmi4j/fmu-driver/build.gradle @@ -7,6 +7,7 @@ plugins { apply plugin: 'java' apply plugin: 'kotlin' +apply from: rootProject.file("gradle/log4j.gradle") apply from: rootProject.file(("gradle/junit.gradle")) def group = "no.ntnu.ihb.fmi4j.driver" diff --git a/java/fmi4j/fmu-slaves/build.gradle b/java/fmi4j/fmu-slaves/build.gradle index a0e6bbb8..19aa170a 100644 --- a/java/fmi4j/fmu-slaves/build.gradle +++ b/java/fmi4j/fmu-slaves/build.gradle @@ -14,6 +14,8 @@ dependencies { jar { archiveName("${project.name}.jar") from { - configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + configurations.compile.collect { + it.isDirectory() ? it : zipTree(it) + } } } diff --git a/java/fmi4j/gradle/log4j.gradle b/java/fmi4j/gradle/log4j.gradle new file mode 100644 index 00000000..43e793a3 --- /dev/null +++ b/java/fmi4j/gradle/log4j.gradle @@ -0,0 +1,8 @@ + +dependencies { + + def slf4j_version = '1.7.25' + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4j_version + runtimeOnly group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4j_version + +}