| /* |
| * Copyright (C) 2017 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| apply from: "$rootDir/buildSrc/base/baseJava.gradle" |
| |
| sourceSets { |
| main { |
| java { |
| srcDirs 'java/com/google/devtools/build/android' |
| } |
| } |
| tryWithResources { |
| java { |
| srcDirs 'java/com/google/devtools/build/android/desugar/runtime' |
| } |
| } |
| } |
| |
| sourceCompatibility = JavaVersion.VERSION_1_7 |
| targetCompatibility = JavaVersion.VERSION_1_7 |
| |
| // these have to match the dependencies found in Android.mk |
| dependencies { |
| compileOnly 'com.google.code.findbugs:jsr305:3.0.1' |
| compileOnly 'com.google.auto.value:auto-value:1.3' |
| compileOnly 'com.google.errorprone:error_prone_annotations:2.0.18' |
| |
| compile project(':external:desugar:optionsLib') |
| compile 'com.google.guava:guava:20.0' |
| compile 'org.ow2.asm:asm:5.2' |
| compile 'org.ow2.asm:asm-tree:5.2' |
| compile 'org.ow2.asm:asm-commons:5.2' |
| } |
| |
| task('fatJarCreator', type: Jar) { |
| from { |
| configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } |
| } |
| from { |
| sourceSets.main.output |
| } |
| archiveName 'desugar_deploy.jar' |
| manifest { |
| attributes 'Main-Class': 'com.google.devtools.build.android.desugar.Desugar' |
| } |
| } |
| |
| task('runtimeTryWithResourcesCreator', type: Jar) { |
| from { |
| sourceSets.tryWithResources.output |
| } |
| archiveName 'libthrowable_extension.jar' |
| } |
| |
| configurations { |
| fatJar |
| runtimeTryWithResources |
| } |
| |
| artifacts { |
| fatJar fatJarCreator |
| runtimeTryWithResources runtimeTryWithResourcesCreator |
| } |
| |