Jeff Gaston | 2f57588 | 2023-04-19 13:47:50 -0400 | [diff] [blame] | 1 | // This file applies configuration common to projects in buildSrc |
Jeff Gaston | 78a97ef | 2023-08-08 11:29:04 -0400 | [diff] [blame^] | 2 | |
| 3 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 4 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 5 | apply plugin: "kotlin" |
Jeff Gaston | 5e3e7de | 2022-04-21 14:49:47 -0400 | [diff] [blame] | 6 | apply plugin: "java-gradle-plugin" |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 7 | |
| 8 | buildscript { |
| 9 | project.ext.supportRootFolder = project.projectDir.getParentFile().getParentFile() |
| 10 | apply from: "../repos.gradle" |
| 11 | repos.addMavenRepositories(repositories) |
| 12 | dependencies { |
| 13 | classpath(libs.kotlinGradlePluginz) |
| 14 | } |
| 15 | } |
| 16 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 17 | dependencies { |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 18 | implementation(project(":jetpad-integration")) |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 19 | } |
| 20 | |
Jeff Gaston | 2f57588 | 2023-04-19 13:47:50 -0400 | [diff] [blame] | 21 | apply from: "../shared-dependencies.gradle" |
| 22 | |
Jim Sproch | ef5fb01 | 2022-12-06 15:28:12 -0800 | [diff] [blame] | 23 | java { |
Ivan Gavrilovic | 259a516e | 2023-04-27 12:26:46 +0100 | [diff] [blame] | 24 | sourceCompatibility = JavaVersion.VERSION_17 |
| 25 | targetCompatibility = JavaVersion.VERSION_17 |
Jim Sproch | ef5fb01 | 2022-12-06 15:28:12 -0800 | [diff] [blame] | 26 | } |
| 27 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 28 | project.tasks.withType(Jar) { task -> |
| 29 | task.reproducibleFileOrder = true |
| 30 | task.preserveFileTimestamps = false |
| 31 | } |
Jeff Gaston | 5e3e7de | 2022-04-21 14:49:47 -0400 | [diff] [blame] | 32 | |
| 33 | validatePlugins { |
| 34 | enableStricterValidation = true |
| 35 | } |
Jeff Gaston | 78a97ef | 2023-08-08 11:29:04 -0400 | [diff] [blame^] | 36 | |
| 37 | project.repos.addMavenRepositories(project.repositories) |
| 38 | tasks.withType(KotlinCompile).configureEach { |
| 39 | kotlinOptions { |
| 40 | jvmTarget = "17" |
| 41 | freeCompilerArgs += [ |
| 42 | "-Werror", |
| 43 | "-Xskip-metadata-version-check" |
| 44 | ] |
| 45 | languageVersion = "1.8" |
| 46 | apiVersion = "1.8" |
| 47 | } |
| 48 | } |