blob: 3d981f64abc6f2ca5ba25dfcb7580f701c4aef86 [file] [log] [blame]
Morten Krogh-Jespersen5a37de82023-03-02 01:42:28 +01001// 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
5plugins {
6 `kotlin-dsl`
7 id("dependencies-plugin")
8}
9
10java {
11 sourceSets.main.configure {
12 java.srcDir(getRoot().resolveAll("src", "keepanno", "java"))
13 }
14 sourceCompatibility = JvmCompatibility.sourceCompatibility
15 targetCompatibility = JvmCompatibility.targetCompatibility
Morten Krogh-Jespersenc06e2222023-09-18 17:52:21 +020016 withSourcesJar()
Morten Krogh-Jespersen5a37de82023-03-02 01:42:28 +010017}
18
19dependencies {
20 compileOnly(Deps.asm)
21 compileOnly(Deps.guava)
22}
Morten Krogh-Jespersenc6fa1632023-09-14 15:55:25 +020023
24tasks {
Rico Wind0cdd1912023-09-25 11:24:32 +020025 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-Jespersenc6fa1632023-09-14 15:55:25 +020033 val keepAnnoJar by registering(Jar::class) {
34 dependsOn(gradle.includedBuild("shared").task(":downloadDeps"))
35 from(sourceSets.main.get().output)
Morten Krogh-Jespersenc6fa1632023-09-14 15:55:25 +020036 }
Ian Zerny5b0b90e2023-11-16 12:36:42 +010037
38 val keepAnnoAnnotationsDoc by registering(Javadoc::class) {
39 source = sourceSets.main.get().allJava
40 include("com/android/tools/r8/keepanno/annotations/*")
41 }
Morten Krogh-Jespersenc6fa1632023-09-14 15:55:25 +020042}