diff options
author | Rocky Madden <git@rockymadden.com> | 2013-05-20 16:30:52 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-05-20 16:30:52 -0600 |
commit | c0de09e838282fa708125570971bdca15f905d06 (patch) | |
tree | 217c55b47b7baf3d6f8e134ba86bd59571550182 /stringmetric-core/build.gradle | |
parent | 6c8a9f1ca60822ca2ee1839bca2cd00afea7037f (diff) | |
download | stringmetric-c0de09e838282fa708125570971bdca15f905d06.tar.gz stringmetric-c0de09e838282fa708125570971bdca15f905d06.tar.bz2 stringmetric-c0de09e838282fa708125570971bdca15f905d06.zip |
Changed subproject folder naming. Updated Scala to 2.10.1.
Diffstat (limited to 'stringmetric-core/build.gradle')
-rwxr-xr-x | stringmetric-core/build.gradle | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/stringmetric-core/build.gradle b/stringmetric-core/build.gradle new file mode 100755 index 0000000..312e6c0 --- /dev/null +++ b/stringmetric-core/build.gradle @@ -0,0 +1,113 @@ +apply plugin: 'maven' +apply plugin: 'signing' + +def isMavenDeployable = hasProperty('mavenRepositoryUrl') && hasProperty('mavenRepositoryUsername') && hasProperty('mavenRepositoryPassword') + +dependencies { + testCompile 'com.google.caliper:caliper:0.5-rc1' +} + +sourceSets { + benchmark { + output.resourcesDir "${project.buildDir}/classes/benchmark" + + java { + srcDir 'source/benchmark/java' + } + resources { + srcDir 'source/benchmark/resource' + } + scala { + srcDir 'source/benchmark/scala' + } + } + main { + output.resourcesDir "${project.buildDir}/classes/main" + + java { + srcDir 'source/core/java' + } + resources { + srcDir 'source/core/resource' + } + scala { + srcDir 'source/core/scala' + } + } + test { + output.resourcesDir "${project.buildDir}/classes/test" + + java { + srcDir 'source/test/java' + } + resources { + srcDir 'source/test/resource' + } + scala { + srcDir 'source/test/scala' + } + } +} + +if (isMavenDeployable) { + signing { + sign configurations.archives + } + + task scaladocJar(type: Jar, dependsOn: scaladoc) { + classifier = 'javadoc' + from "${project.buildDir}/docs/scaladoc" + } + + task sourceJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource + } + + artifacts { + archives jar + archives scaladocJar + archives sourceJar + } + + uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: mavenRepositoryUrl) { + authentication(userName: mavenRepositoryUsername, password: mavenRepositoryPassword) + } + + pom.project { + description "${parent.project.description}" + groupId "${parent.project.group}" + name "${project.name}" + packaging 'jar' + url "${parent.project.url}" + version "${parent.project.version}" + + developers { + developer { + id 'rockymadden' + name 'Rocky Madden' + } + } + + licenses { + license { + name 'Apache License v2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + + scm { + url "${parent.project.scm}" + connection "${parent.project.scm}" + } + } + } + } + } +}
\ No newline at end of file |