-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Over-Run/update
- Loading branch information
Showing
21 changed files
with
548 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
plugins { | ||
kotlin("jvm") version "2.0.0" | ||
plugins { `kotlin-dsl` } | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:2.0.20") | ||
} | ||
|
||
repositories { mavenCentral() } | ||
repositories { | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import gradle.kotlin.dsl.accessors._8758bf21ec0488ee6f70886b9f0e8378.sourceSets | ||
import org.gradle.api.tasks.JavaExec | ||
import org.gradle.jvm.toolchain.JavaLanguageVersion | ||
import org.gradle.kotlin.dsl.get | ||
import org.gradle.kotlin.dsl.provideDelegate | ||
|
||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2024 Overrun Organization | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
*/ | ||
|
||
/** | ||
* @author squid233 | ||
* @since 0.1.0 | ||
*/ | ||
open class GenerateTask : JavaExec() { | ||
private val jdkVersion: String by project | ||
private val jdkEnablePreview: String by project | ||
|
||
init { | ||
classpath(project.sourceSets["main"].runtimeClasspath) | ||
javaLauncher.set(javaToolchainService.launcherFor { | ||
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) | ||
}) | ||
if (jdkEnablePreview.toBoolean()) jvmArgs("--enable-preview") | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
buildSrc/src/main/kotlin/generator.java-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { kotlin("jvm") } | ||
|
||
val jdkVersion: String by rootProject | ||
val kotlinTargetJdkVersion: String by rootProject | ||
|
||
repositories { mavenCentral() } | ||
|
||
tasks.withType<KotlinCompile> { | ||
compilerOptions { jvmTarget.set(JvmTarget.fromTarget(kotlinTargetJdkVersion)) } | ||
} | ||
|
||
tasks.withType<JavaCompile> { | ||
javaCompiler.set(javaToolchains.compilerFor { | ||
targetCompatibility = kotlinTargetJdkVersion | ||
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,3 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2024 Overrun Organization | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
*/ | ||
|
||
plugins { kotlin("jvm") version "2.0.0" } | ||
|
||
allprojects { | ||
apply(plugin = "org.jetbrains.kotlin.jvm") | ||
|
||
val javaToolchains: JavaToolchainService by extensions | ||
val jdkVersion: String by rootProject | ||
val kotlinTargetJdkVersion: String by rootProject | ||
|
||
repositories { mavenCentral() } | ||
|
||
tasks.withType<KotlinCompile> { | ||
compilerOptions { jvmTarget.set(JvmTarget.fromTarget(kotlinTargetJdkVersion)) } | ||
} | ||
|
||
tasks.withType<JavaCompile> { | ||
javaCompiler.set(javaToolchains.compilerFor { | ||
targetCompatibility = kotlinTargetJdkVersion | ||
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) | ||
}) | ||
} | ||
} | ||
|
||
subprojects { | ||
val implementation by configurations | ||
|
||
dependencies { | ||
implementation(project(":generators")) | ||
} | ||
plugins { | ||
id("generator.java-conventions") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
id("generator.java-conventions") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":generators")) | ||
} | ||
|
||
tasks.register<GenerateTask>("generate") { | ||
mainClass = "overrungl.nfd.NFDGeneratorKt" | ||
workingDir = project(":nfd").projectDir.resolve("src/main/java/overrungl/nfd") | ||
} |
24 changes: 24 additions & 0 deletions
24
generators/nfd/src/main/java/overrungl/nfd/NFDGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2024 Overrun Organization | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
*/ | ||
|
||
package overrungl.nfd | ||
|
||
/** | ||
* @author squid233 | ||
* @since 0.1.0 | ||
*/ | ||
fun main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
val jdkVersion: String by rootProject | ||
val jdkEnablePreview: String by rootProject | ||
plugins { | ||
id("generator.java-conventions") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":generators")) | ||
} | ||
|
||
tasks.register<JavaExec>("generate") { | ||
classpath(sourceSets["main"].runtimeClasspath) | ||
javaLauncher.set(javaToolchains.launcherFor { | ||
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) | ||
}) | ||
if (jdkEnablePreview.toBoolean()) jvmArgs("--enable-preview") | ||
tasks.register<GenerateTask>("generate") { | ||
mainClass.set("overrungl.opengl.OpenGLGeneratorKt") | ||
workingDir = project(":opengl").projectDir.resolve("src/main/java/overrungl/opengl") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,12 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2024 Overrun Organization | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
*/ | ||
plugins { | ||
id("generator.java-conventions") | ||
} | ||
|
||
val jdkVersion: String by rootProject | ||
val jdkEnablePreview: String by rootProject | ||
dependencies { | ||
implementation(project(":generators")) | ||
} | ||
|
||
tasks.register<JavaExec>("generate") { | ||
classpath(sourceSets["main"].runtimeClasspath) | ||
javaLauncher.set(javaToolchains.launcherFor { | ||
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) | ||
}) | ||
if (jdkEnablePreview.toBoolean()) jvmArgs("--enable-preview") | ||
tasks.register<GenerateTask>("generate") { | ||
mainClass.set("overrungl.vulkan.VulkanGeneratorKt") | ||
workingDir = project(":vulkan").projectDir.resolve("src/main/java/overrungl/vulkan") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.