Skip to content
Snippets Groups Projects
Commit b1b39161 authored by Denis Arrivault's avatar Denis Arrivault
Browse files

Remove .gradle directory + add the package name for CTest compatibility

parent e67552f7
Branches
No related tags found
No related merge requests found
Pipeline #
Showing with 24 additions and 6 deletions
...@@ -7,4 +7,5 @@ build/ ...@@ -7,4 +7,5 @@ build/
*.bkp *.bkp
*.out *.out
.classpath .classpath
/.gradle/ .gradle/
buildCmake/
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
#Wed Jun 20 13:48:55 CEST 2018
gradle.version=4.7
File deleted
...@@ -9,7 +9,7 @@ jacoco { ...@@ -9,7 +9,7 @@ jacoco {
version = '1.0.0' version = '1.0.0'
applicationName = "ImmutableComplex" applicationName = "ImmutableComplex"
mainClassName = "Main" mainClassName = "main.java.Main"
repositories { repositories {
jcenter() jcenter()
...@@ -19,6 +19,20 @@ dependencies { ...@@ -19,6 +19,20 @@ dependencies {
testCompile "junit:junit:4+" testCompile "junit:junit:4+"
} }
// Here sourceSets is redundant as these are the default gradle paths
sourceSets{
main {
java {
srcDir 'src/main/java'
}
}
test {
java {
srcDir 'src/main/tests'
}
}
}
// Specify the jar manifest to make it executable // Specify the jar manifest to make it executable
jar { jar {
manifest { manifest {
...@@ -37,5 +51,6 @@ jacocoTestReport { ...@@ -37,5 +51,6 @@ jacocoTestReport {
} }
} }
// Finalize test task with jacocoTestReport function
test.finalizedBy(jacocoTestReport) test.finalizedBy(jacocoTestReport)
...@@ -5,7 +5,7 @@ set(CMAKE_JAVA_TARGET_OUTPUT_NAME immutablecomplex-${IMMCOMPLX_VERSION}) ...@@ -5,7 +5,7 @@ set(CMAKE_JAVA_TARGET_OUTPUT_NAME immutablecomplex-${IMMCOMPLX_VERSION})
# Compile the source files into a jar with a main # Compile the source files into a jar with a main
add_jar(immutablecomplex java/Complex.java java/Main.java add_jar(immutablecomplex java/Complex.java java/Main.java
ENTRY_POINT main.java.Main ENTRY_POINT main/java/Main
VERSION ${IMMCOMPLX_VERSION}) VERSION ${IMMCOMPLX_VERSION})
# Get the jar location # Get the jar location
......
/** /**
* Complex class file * Complex class file
*/ */
package main.java;
/** /**
......
package main.java;
public class Main { public class Main {
......
/** /**
* Test file for Complex class * Test file for Complex class
*/ */
package test.java;
import org.junit.Assert; import org.junit.Assert;
...@@ -10,6 +11,8 @@ import org.junit.After; ...@@ -10,6 +11,8 @@ import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import main.java.Complex;
/** /**
* Junit test case for my immutable complex class. * Junit test case for my immutable complex class.
* @author arrivault * @author arrivault
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment