-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial native implementation for Linux and Windows x64
- Loading branch information
1 parent
3c8de1b
commit 86973a8
Showing
16 changed files
with
783 additions
and
84 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 +1,2 @@ | ||
kotlin.code.style=official | ||
org.gradle.jvmargs=-Xmx4096M |
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,75 @@ | ||
import java.io.FileInputStream | ||
import java.util.* | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.multiplatform") | ||
id("maven-publish") | ||
} | ||
|
||
//artifactId = "kgl-glfw" | ||
group = "com.danielgergely.kgl" | ||
version = rootProject.ext["currentVersion"] as String | ||
|
||
repositories { | ||
mavenCentral() | ||
|
||
maven(url = "https://maven.pkg.github.com/Dominaezzz/kgl") { | ||
credentials { | ||
username = getLocalProperty("GITHUB_USER") | ||
password = getLocalProperty("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
|
||
val kglVersion = "0.1.11" | ||
|
||
kotlin { | ||
/* Targets configuration omitted. | ||
* To find out how to configure the targets, please follow the link: | ||
* https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets */ | ||
|
||
linuxX64() | ||
mingwX64() | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(kotlin("stdlib-common")) | ||
implementation(project(":kgl")) | ||
|
||
implementation("com.kgl:kgl-core:$kglVersion") | ||
implementation("com.kgl:kgl-glfw:$kglVersion") | ||
implementation("com.kgl:kgl-glfw-static:$kglVersion") // For GLFW static binaries | ||
implementation("com.kgl:kgl-opengl:$kglVersion") | ||
implementation("com.kgl:kgl-vulkan:$kglVersion") | ||
implementation("com.kgl:kgl-glfw-vulkan:$kglVersion") | ||
implementation("com.kgl:kgl-stb:$kglVersion") | ||
} | ||
} | ||
val linuxX64Main by getting { } | ||
val mingwX64Main by getting { } | ||
val nativeMain by sourceSets.creating { | ||
dependsOn(commonMain) | ||
linuxX64Main.dependsOn(this) | ||
mingwX64Main.dependsOn(this) | ||
|
||
dependencies { | ||
|
||
} | ||
} | ||
} | ||
} | ||
|
||
fun getLocalProperty(key: String): String? = | ||
rootDir.resolve("local.properties") | ||
.let { file -> | ||
if (file.exists()) { | ||
FileInputStream(file) | ||
} else { | ||
null | ||
} | ||
}?.use { fileInputStream -> | ||
val prop = Properties() | ||
prop.load(fileInputStream) | ||
prop.getProperty(key) | ||
} ?: System.getenv(key) |
Oops, something went wrong.