| apply plugin: 'java' |
| apply plugin: 'clone-artifacts' |
| apply plugin: 'maven' |
| |
| repositories { |
| maven { url = uri(rootProject.cloneArtifacts.repository) } |
| } |
| |
| test { |
| // todo: disable this for CI since we'll use the CI UI to do the report. |
| reports.html.enabled = true |
| } |
| |
| afterEvaluate { |
| compileJava.options.annotationProcessorGeneratedSourcesDirectory project.layout.buildDirectory. |
| dir("generated/src/main/annotationProcessor").get().asFile |
| } |
| |
| sourceSets { |
| main.resources.exclude '**/*.kt' |
| test.resources.exclude '**/*.kt' |
| } |
| |
| apply from: "$rootDir/buildSrc/base/base.gradle" |
| |
| // Custom Upload task with an @OutputDirectory to allow up-to-date check. |
| class LocalUpload extends Upload { |
| @OutputDirectory |
| File getArtifact() { |
| String artifactLocation = "${project.rootProject.ext.localRepo}/" + |
| "${project.group.replace('.', File.separator)}/${project.archivesBaseName}/" + |
| "${project.version}" |
| return new File(artifactLocation) |
| } |
| |
| @InputFiles |
| FileCollection getDependencies() { |
| return project.sourceSets.main.runtimeClasspath |
| } |
| } |
| |
| // Don't put the test dependencies in the pom. |
| conf2ScopeMappings.mappings.remove(configurations.testCompile) |
| |
| task publishLocal(type: LocalUpload) { |
| configuration = configurations.archives |
| repositories { |
| mavenDeployer { |
| repository(url: uri("$rootProject.ext.localRepo")) |
| pom.project { |
| url 'https://developer.android.com/studio' |
| inceptionYear '2007' |
| |
| licenses { |
| license { |
| name 'The Apache Software License, Version 2.0' |
| url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| distribution 'repo' |
| } |
| } |
| |
| scm { |
| url 'https://android.googlesource.com/platform/tools/base' |
| connection 'git://android.googlesource.com/platform/tools/base.git' |
| } |
| developers { |
| developer { |
| name 'The Android Open Source Project' |
| } |
| } |
| } |
| } |
| } |
| } |