43 lines
1.1 KiB
Groovy
43 lines
1.1 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'maven'
|
|
|
|
configurations { providedCompile }
|
|
|
|
dependencies {
|
|
compile 'org.slf4j:slf4j-api:1.7.6'
|
|
providedCompile 'com.squareup.okhttp:okhttp:1.5.2'
|
|
providedCompile 'com.google.code.findbugs:annotations:2.0.1'
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs = ['src']
|
|
main.resources.srcDirs = ['resources']
|
|
main.compileClasspath += configurations.providedCompile
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
artifacts {
|
|
archives sourcesJar
|
|
}
|
|
|
|
eclipse.classpath {
|
|
//you can tweak the classpath of the Eclipse project by adding extra configurations:
|
|
plusConfigurations += [ configurations.providedCompile ]
|
|
|
|
file.whenMerged { classpath ->
|
|
classpath.entries.findAll { entry ->
|
|
entry.path.contains('annotations') }*.exported = false
|
|
}
|
|
|
|
//if you don't want some classpath entries 'exported' in Eclipse
|
|
noExportConfigurations += [ configurations.providedCompile ]
|
|
|
|
|
|
//default settings for downloading sources and Javadoc:
|
|
//downloadSources = true
|
|
//downloadJavadoc = false
|
|
}
|