GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — dropbox-sdk-java/build.gradle at master · ro-ot/dropbox-sdk-java Expand file tree/ Copy pathbuild.gradleMore file actions 275 lines (233 loc) · 8.25 KB / Copy pathbuild.gradleFile metadata and controls275 lines (233 loc) · 8.25 KB 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 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 import org.gradle.internal.os.OperatingSystem; apply plugin: 'java' apply plugin: 'osgi' apply plugin: 'maven' apply plugin: 'com.github.ben-manes.versions' // dependencyUpdates task description = 'Official Java client library for the Dropbox API.' group = 'com.dropbox.core' archivesBaseName = 'dropbox-core-sdk' version = '0-SNAPSHOT' sourceCompatibility = JavaVersion.VERSION_1_6 targetCompatibility = JavaVersion.VERSION_1_6 // needed before we define the pom conf2ScopeMappings.addMapping(1, configurations.compileOnly, 'provided') ext { mavenName = 'Official Dropbox Java SDK' generatedSources = file("$buildDir/generated-sources") generatedResources = file("$buildDir/generated-resources") authInfoPropertyName = 'com.dropbox.test.authInfoFile' basePom = pom { name = mavenName artifactId = archivesBaseName project { description = description packaging 'jar' url 'https://www.dropbox.com/developers/core' scm { connection 'scm:git:[email protected]:dropbox/dropbox-sdk-java.git' developerConnection 'scm:git:[email protected]:dropbox/dropbox-sdk-java.git' url 'https://github.com/dropbox/dropbox-sdk-java' } developers { developer { id 'dropbox-api-team' name 'Dropbox API Team' email '[email protected]' organization = 'Dropbox' } } licenses { license { name 'MIT' url 'http://opensource.org/licenses/MIT' distribution 'repo' } } } } } buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0' } } repositories { mavenCentral() } dependencies { // Important: Jackson 2.8+ will be free to use JDK7 features and no longer guarantees JDK6 // compatibility compile 'com.fasterxml.jackson.core:jackson-core:2.7.4' compileOnly 'javax.servlet:servlet-api:2.5' compileOnly 'com.squareup.okhttp:okhttp:2.7.5' // support both v2 and v3 to avoid compileOnly 'com.squareup.okhttp3:okhttp:3.3.1' // method count bloat compileOnly 'com.google.android:android:4.1.1.4' compileOnly 'com.google.appengine:appengine-api-1.0-sdk:1.9.38' testCompile 'org.testng:testng:6.9.10' testCompile 'org.mockito:mockito-core:1.10.19' testCompile 'org.openjdk.jmh:jmh-core:1.12' testCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.12' testCompile 'com.google.appengine:appengine-api-1.0-sdk:1.9.38' testCompile 'com.google.appengine:appengine-api-labs:1.9.38' testCompile 'com.google.appengine:appengine-api-stubs:1.9.38' testCompile 'com.google.appengine:appengine-testing:1.9.38' testCompile 'com.squareup.okhttp:okhttp:2.7.5' testCompile 'com.squareup.okhttp3:okhttp:3.3.1' } processResources { filesMatching('**/sdk-version.txt') { expand project.properties } } compileJava { options.compilerArgs << '-Xlint:all' options.warnings = true options.deprecation = true options.encoding = 'utf-8' } test { useTestNG() // TestNG specific options options.parallel 'classesAndMethods' options.preserveOrder true options.threadCount 4 // exclude integration tests exclude '**/IT*.class' exclude '**/*IT.class' exclude '**/*IT$*.class' testLogging { events "skipped", "failed" info { events "passed", "skipped", "failed" } } } def getAuthInfoFile() { if (!project.hasProperty(authInfoPropertyName)) { throw new GradleException('' + "These tests require the \"${authInfoPropertyName}\" " + "project property be set to point to an authorization JSON file " + "(e.g. ./gradlew integrationTest -P${authInfoPropertyName}=auth.json)." ) } def authInfoFile = file(project.property(authInfoPropertyName)) if (!authInfoFile.exists()) { throw new GradleException('' + "The test auth info file does not exist: \"${authInfoFile.absolutePath}\". " + "Please ensure the \"${authInfoPropertyName}\" project property is set to point to " + "the correct authorization JSON file." ) } return authInfoFile } task integrationTest(type: Test) { description 'Runs integration tests against Production or Dev servers.' useTestNG() // TestNG specific options options.preserveOrder true // only select integration tests (similar to maven-failsafe-plugin rules) include '**/IT*.class' include '**/*IT.class' include '**/*IT$*.class' testLogging { events "skipped", "failed" info { events "passed", "skipped", "failed" } } reports { html { destination = file("${buildDir}/reports/integration-tests") } } ext { authInfoPropertyName = 'com.dropbox.test.authInfoFile' httpRequestorPropertyName = 'com.dropbox.test.httpRequestor' } doFirst { systemProperty authInfoPropertyName, getAuthInfoFile().absolutePath if (project.hasProperty(httpRequestorPropertyName)) { systemProperty httpRequestorPropertyName, project.property(httpRequestorPropertyName) } } } javadoc { title "${project.mavenName} ${project.version} API" failOnError true // JDK 8's javadoc has an on-by-default lint called "missing", which requires that everything // be documented. Disable this lint because we intentionally don't document some things. // // NOTE: ugly hack to set our doclint settings due to strange handling of string options by the // javadoc task. if (JavaVersion.current().isJava8Compatible()) { options.addBooleanOption "Xdoclint:all,-missing", true } options.addStringOption "link", "http://docs.oracle.com/javase/6/docs/api/" } jar { // OsgiManifest since we import 'osgi' plugin manifest { name project.name description project.description license project.basePom.getModel().getLicenses()[0].url def noeeProp = 'osgi.bnd.noee' def noee = project.properties.get(noeeProp, System.properties.get(noeeProp, 'false')) instruction '-noee', noee } } task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } artifacts { archives sourcesJar archives javadocJar } install { repositories.mavenInstaller { pom = project.basePom } } // To avoid cross-compilation surprises, add JDK6 libs to the boot classpath. This prevents issues // where we depend on a JDK7 interface that did not exist in JDK6. if (project.sourceCompatibility == JavaVersion.VERSION_1_6) { if (System.env.JDK6_HOME == null) { logger.warn("Set JDK6_HOME environment to disable boot classpath warnings.") } else { def jdkHome = System.env.JDK6_HOME def sep = File.pathSeparator logger.info("Setting JVM boot classpath to use ${jdkHome}") project.tasks.withType(JavaCompile) { def jdkLibs = "${jdkHome}/jre/lib" def runtimeClasses = "rt.jar" if (OperatingSystem.current().isMacOsX()) { jdkLibs = "${jdkHome}/Classes" runtimeClasses = "classes.jar" } options.bootClasspath = "${jdkLibs}/${runtimeClasses}" options.bootClasspath += "${sep}${jdkLibs}/jsse.jar" options.bootClasspath += "${sep}${jdkLibs}/jce.jar" } } } // reject dependencyUpdates candidates with alpha or beta in their names: dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all { ComponentSelection selection -> boolean rejected = ['alpha', 'beta', 'rc'].any { qualifier -> selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ } if (rejected) { selection.reject('Release candidate') } } } } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |