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.srcDir(root.resolveAll("src", "test", "examplesJava20")) |
| 19 | } |
| 20 | sourceCompatibility = JavaVersion.VERSION_20 |
| 21 | targetCompatibility = JavaVersion.VERSION_20 |
| 22 | } |
| 23 | |
| 24 | dependencies { } |
| 25 | |
| 26 | // We just need to register the examples jars for it to be referenced by other modules. |
| 27 | val buildExampleJars = buildJavaExamplesJars("Java20") |
| 28 | |
| 29 | tasks { |
| 30 | withType<JavaCompile> { |
| 31 | options.setFork(true) |
| 32 | options.forkOptions.memoryMaximumSize = "3g" |
| 33 | options.forkOptions.executable = getCompilerPath(Jdk.JDK_20) |
| 34 | } |
| 35 | } |
| 36 | |