blob: 54b5a45a1bb69e1863fb29baa1984c2030af07c1 [file] [log] [blame]
Morten Krogh-Jespersen81c34082023-06-22 15:37:41 +02001// 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
5import org.gradle.api.JavaVersion
6import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
7
8plugins {
9 `kotlin-dsl`
10 `java-library`
11 id("dependencies-plugin")
12}
13
14val root = getRoot()
15
16java {
17 sourceSets.test.configure {
18 java.srcDirs.clear()
19 java.srcDir(root.resolveAll("src", "test", "examplesAndroidN"))
20 }
21 sourceCompatibility = JavaVersion.VERSION_1_8
22 targetCompatibility = JavaVersion.VERSION_1_8
23}
24
25dependencies {
26 testCompileOnly(Deps.asm)
27}
28
29// We just need to register the examples jars for it to be referenced by other modules.
Morten Krogh-Jespersen5c79e4e2023-06-27 16:34:04 +020030val buildExampleJars = buildExampleJars("examplesAndroidN")
Morten Krogh-Jespersen81c34082023-06-22 15:37:41 +020031
32tasks {
33 withType<JavaCompile> {
34 options.setFork(true)
35 options.forkOptions.memoryMaximumSize = "3g"
36 options.forkOptions.jvmArgs = listOf(
37 "-Xss256m",
38 // Set the bootclass path so compilation is consistent with 1.8 target compatibility.
39 "-Xbootclasspath/a:third_party/openjdk/openjdk-rt-1.8/rt.jar")
40 }
41}