mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 13:11:32 +00:00
ffi: migrate to java.lang.foreign and require Java 21
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
embeddedKotlin("plugin.serialization")
|
||||
@ -10,14 +11,31 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
|
||||
implementation("org.jetbrains.kotlin:kotlin-serialization:1.9.10")
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20-Beta2")
|
||||
implementation("org.jetbrains.kotlin:kotlin-serialization:1.9.20-Beta2")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
||||
implementation("com.charleskorn.kaml:kaml:0.55.0")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_20
|
||||
targetCompatibility = JavaVersion.VERSION_20
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "20"
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
create("pork_root") {
|
||||
id = "gay.pizza.pork.root"
|
||||
implementationClass = "gay.pizza.pork.buildext.PorkRootPlugin"
|
||||
|
||||
displayName = "Pork Root"
|
||||
description = "Root convention for pork"
|
||||
}
|
||||
|
||||
create("pork_ast") {
|
||||
id = "gay.pizza.pork.ast"
|
||||
implementationClass = "gay.pizza.pork.buildext.PorkAstPlugin"
|
||||
|
@ -5,6 +5,7 @@ import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
open class PorkModulePlugin : Plugin<Project> {
|
||||
@ -16,13 +17,17 @@ open class PorkModulePlugin : Plugin<Project> {
|
||||
target.repositories.maven(url = "https://gitlab.com/api/v4/projects/49101454/packages/maven")
|
||||
|
||||
target.extensions.getByType<JavaPluginExtension>().apply {
|
||||
val javaVersion = JavaVersion.toVersion(17)
|
||||
val javaVersion = JavaVersion.toVersion(21)
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
}
|
||||
|
||||
target.tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "17"
|
||||
kotlinOptions.jvmTarget = "21"
|
||||
}
|
||||
|
||||
target.extensions.getByType<KotlinJvmProjectExtension>().apply {
|
||||
jvmToolchain(21)
|
||||
}
|
||||
|
||||
target.dependencies {
|
||||
|
@ -0,0 +1,8 @@
|
||||
package gay.pizza.pork.buildext
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
class PorkRootPlugin : Plugin<Project> {
|
||||
override fun apply(target: Project) {}
|
||||
}
|
Reference in New Issue
Block a user