Skip to content
Snippets Groups Projects
Commit f3ed6b3b authored by Daniel Felipe González Obando's avatar Daniel Felipe González Obando
Browse files

updated gradle build file

parent 8a79d10d
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,4 @@
/.classpath
/.project
/build/
/ecbuild/
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse'
version = '0.1.0'
println project.name
println "ICY_HOME=${System.env.ICY_HOME}"
println project.name + " " + version
configurations {
extraLibs // configuration that holds jars to include in the jar
extraLibs // configuration that holds jars to include in the jar
implementation.extendsFrom(extraLibs)
}
repositories {
mavenCentral()
jcenter()
mavenCentral()
jcenter()
}
println "ICY_HOME=${System.env.ICY_HOME}"
dependencies {
extraLibs 'org.slf4j:slf4j-api:1.7.21'
configurations.implementation.extendsFrom(configurations.extraLibs)
compile files("${System.env.ICY_HOME}/icy.jar") // Icy core
compile files("${System.env.ICY_HOME}/lib/bioformats.jar") // bioformats
compile files("${System.env.ICY_HOME}/plugins/adufour/ezplug/EzPlug.jar") // EzPlug
compile files("${System.env.ICY_HOME}/plugins/adufour/blocks/Blocks.jar") // Blocks
compile files("${System.env.ICY_HOME}/plugins/adufour/protocols/Protocols.jar") // Protocols
extraLibs 'org.slf4j:slf4j-api:1.7.21'
testCompile 'junit:junit:4.12'
}
implementation files("${System.env.ICY_HOME}/icy.jar") // Icy core
implementation files("${System.env.ICY_HOME}/lib/bioformats.jar") // bioformats
implementation files("${System.env.ICY_HOME}/plugins/adufour/ezplug/EzPlug.jar") // EzPlug
implementation files("${System.env.ICY_HOME}/plugins/adufour/blocks/Blocks.jar") // Blocks
implementation files("${System.env.ICY_HOME}/plugins/adufour/protocols/Protocols.jar") // Protocols
// In this section source and test files are declared
sourceSets {
main {
java {
srcDirs = ['src']
resources.srcDirs = ['res']
}
test {
java.srcDirs = ['test']
resources.srcDirs = ['res']
}
}
testImplementation 'junit:junit:4.12'
}
// In this section we add the icy nature of the project in eclipse
eclipse {
classpath{
defaultOutputDir = file("ecbuild")
file.whenMerged {
entries.each {
source ->
// This seems kludgy. If the second test is omitted, it fails processing a 'Project Dependency' entry
if (source.kind == 'src' && source.toString().contains('output')) {
source.output = 'ecbuild'
}
}
}
downloadJavadoc = true
}
project {
natures += ['icy.icy4eclipse.core.icynature']
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.output
from sourceSets.main.java
from configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
classifier = 'sources'
from sourceSets.main.output
from sourceSets.main.java
from configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
archives sourcesJar
archives javadocJar
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment