Morten Krogh-Jespersen | 81c3408 | 2023-06-22 15:37:41 +0200 | [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 | import org.gradle.api.JavaVersion |
| 6 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 7 | |
| 8 | plugins { |
| 9 | `kotlin-dsl` |
| 10 | `java-library` |
| 11 | id("dependencies-plugin") |
| 12 | } |
| 13 | |
| 14 | val root = getRoot() |
| 15 | |
| 16 | java { |
| 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 | |
| 25 | dependencies { |
| 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-Jespersen | 5c79e4e | 2023-06-27 16:34:04 +0200 | [diff] [blame^] | 30 | val buildExampleJars = buildExampleJars("examplesAndroidN") |
Morten Krogh-Jespersen | 81c3408 | 2023-06-22 15:37:41 +0200 | [diff] [blame] | 31 | |
| 32 | tasks { |
| 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 | } |