Morten Krogh-Jespersen | 5a37de8 | 2023-03-02 01:42:28 +0100 | [diff] [blame] | 1 | // Copyright (c) 2023, the R8 project authors. Please see the AUTHORS file |
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | plugins { |
| 6 | `kotlin-dsl` |
| 7 | id("dependencies-plugin") |
| 8 | } |
| 9 | |
| 10 | java { |
| 11 | sourceSets.main.configure { |
| 12 | java.srcDir(getRoot().resolveAll("src", "keepanno", "java")) |
| 13 | } |
| 14 | sourceCompatibility = JvmCompatibility.sourceCompatibility |
| 15 | targetCompatibility = JvmCompatibility.targetCompatibility |
Morten Krogh-Jespersen | c06e222 | 2023-09-18 17:52:21 +0200 | [diff] [blame] | 16 | withSourcesJar() |
Morten Krogh-Jespersen | 5a37de8 | 2023-03-02 01:42:28 +0100 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | dependencies { |
| 20 | compileOnly(Deps.asm) |
| 21 | compileOnly(Deps.guava) |
| 22 | } |
Morten Krogh-Jespersen | c6fa163 | 2023-09-14 15:55:25 +0200 | [diff] [blame] | 23 | |
| 24 | tasks { |
Rico Wind | 0cdd191 | 2023-09-25 11:24:32 +0200 | [diff] [blame] | 25 | val keepAnnoAnnotationsJar by registering(Jar::class) { |
| 26 | dependsOn(gradle.includedBuild("shared").task(":downloadDeps")) |
| 27 | from(sourceSets.main.get().output) |
| 28 | include("com/android/tools/r8/keepanno/annotations/*") |
| 29 | destinationDirectory.set(getRoot().resolveAll("build", "libs")) |
| 30 | archiveFileName.set("keepanno-annotations.jar") |
| 31 | } |
| 32 | |
Morten Krogh-Jespersen | c6fa163 | 2023-09-14 15:55:25 +0200 | [diff] [blame] | 33 | val keepAnnoJar by registering(Jar::class) { |
| 34 | dependsOn(gradle.includedBuild("shared").task(":downloadDeps")) |
| 35 | from(sourceSets.main.get().output) |
Morten Krogh-Jespersen | c6fa163 | 2023-09-14 15:55:25 +0200 | [diff] [blame] | 36 | } |
Ian Zerny | 5b0b90e | 2023-11-16 12:36:42 +0100 | [diff] [blame] | 37 | |
| 38 | val keepAnnoAnnotationsDoc by registering(Javadoc::class) { |
| 39 | source = sourceSets.main.get().allJava |
| 40 | include("com/android/tools/r8/keepanno/annotations/*") |
| 41 | } |
Morten Krogh-Jespersen | c6fa163 | 2023-09-14 15:55:25 +0200 | [diff] [blame] | 42 | } |