1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
|
import static java.lang.System.getenv
buildscript {
repositories {
jcenter()
}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '3.0.3')
}
}
allprojects {
apply plugin: 'idea'
//apply plugin: 'maven-publish'
//apply plugin: 'com.jfrog.artifactory'
group = 'com.jfrog.bintray.client'
/*
artifactory {
contextUrl = 'https://oss.jfrog.org'
resolve {
repository {
repoKey = 'libs-release'
}
}
publish {
repository {
repoKey = 'oss-release-local' //The Artifactory repository key to publish to
username = project.hasProperty('bintrayUser') ? project.bintrayUser : getenv()['BINTRAY_USER']
password = project.hasProperty('bintrayKey') ? project.bintrayKey : getenv()['BINTRAY_KEY']
}
defaults {
publications 'main'
properties = ['bintray.repo': 'jfrog/bintray-tools', 'bintray.package': 'bintray-client-java', 'bintray.version': version.toString()]
}
}
}
*/
}
//artifactoryPublish.skip = true
subprojects() {
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
compile addSlf4J('slf4j-api')
compile addSlf4J('log4j-over-slf4j')
compile addSlf4J('jcl-over-slf4j')
compile 'ch.qos.logback:logback-classic:1.0.10'
compile 'joda-time:joda-time:2.2'
compile 'commons-io:commons-io:2.1'
compile "com.fasterxml.jackson.core:jackson-annotations:2.x"
compile "com.fasterxml.jackson.core:jackson-core:2.x"
compile "com.fasterxml.jackson.core:jackson-databind:2.x"
compile("org.apache.httpcomponents:httpclient:4.3.5") {
exclude group: 'commons-logging' //DO NOT REMOVE
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
/*
task testResultsZip(type: Zip) {
classifier = 'testreports'
from testReportDir
}
test {
jvmArgs (['-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog',
'-Dorg.apache.commons.logging.simplelog.showdatetime=true',
'-Dorg.apache.commons.logging.simplelog.log.org.apache.http=ERROR',
'-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR'])
testLogging {
exceptionFormat "full"
events "started", "passed", "skipped", "failed", "standardOut", "standardError"
minGranularity 0
}
finalizedBy(testResultsZip)
}
*/
/*
publishing {
publications {
main(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
if (testResultsZip.archivePath.exists()) {
artifact testResultsZip
}
pom.withXml {
asNode().with {
appendNode('packaging', 'jar')
appendNode('name', 'Bintray Java client')
appendNode('description', 'Java client for working with Bintray')
appendNode('url', 'https://github.com/bintray/bintray-client-java')
appendNode('licenses').with {
appendNode('license').with {
appendNode('name', 'The Apache Software License, Version 2.0')
appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0')
}
}
appendNode('developers').with {
appendNode('developer').with {
appendNode('id', 'NoamTenne')
appendNode('name', 'Noam Tenne')
appendNode('email', 'NoamT@jfrog.com')
}
appendNode('developer').with {
appendNode('id', 'jbaruch')
appendNode('name', 'Baruch Sadogursky')
appendNode('email', 'jbaruch@jfrog.com')
}
appendNode('developer').with {
appendNode('id', 'danf')
appendNode('name', 'Dan Feldman')
appendNode('email', 'danf@jfrog.com')
}
}
appendNode('scm').with {
appendNode('connection', 'git@github.com:JFrogDev/bintray/bintray-client-java.git')
appendNode('developerConnection', 'git@github.com:bintray/bintray-client-java.git')
appendNode('url', 'https://github.com/bintray/bintray-client-java')
}
}
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
}
*/
}
project(':bintray-client-java-service') {
dependencies {
compile project(':bintray-client-java-api')
compile 'org.codehaus.groovy:groovy:1.8.0'
compile 'commons-lang:commons-lang:2.6'
/*
testCompile group: 'com.timgroup', name: 'jgravatar', version: '1.0'
testCompile("org.spockframework:spock-core:0.7-groovy-1.8") {
exclude module: 'groovy-all'
}
*/
}
}
project(':bintray-client-java-api') {
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
project(':bintray-client-java-service') {
apply plugin: 'groovy'
}
def addSlf4J(name) {
[group: 'org.slf4j', name: name, version: '1.7.5']
}
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}
idea {
project {
jdkName = '1.7'
languageLevel = '1.7'
wildcards += '?*.gradle'
ipr {
withXml { provider ->
def node = provider.asNode()
// Use git
def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
vcsConfig.mapping[0].'@vcs' = 'Git'
}
}
}
}
|