init commit
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,8 @@
|
|||||||
# ---> Kotlin
|
# ---> Kotlin
|
||||||
# Compiled class file
|
# Compiled class file
|
||||||
*.class
|
*.class
|
||||||
|
build
|
||||||
|
.gradle
|
||||||
|
|
||||||
# Log file
|
# Log file
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
36
hello_world_native/build.gradle
Normal file
36
hello_world_native/build.gradle
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
// https://play.kotlinlang.org/hands-on/Introduction%20to%20Kotlin%20Native/02_CreatingAProject
|
||||||
|
plugins {
|
||||||
|
id 'kotlin-multiplatform' version '1.3.31'
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
kotlin {
|
||||||
|
// For ARM, should be changed to iosArm32 or iosArm64
|
||||||
|
// For Linux, should be changed to e.g. linuxX64
|
||||||
|
// For MacOS, should be changed to e.g. macosX64
|
||||||
|
// For Windows, should be changed to e.g. mingwX64
|
||||||
|
macosX64("macos") {
|
||||||
|
binaries {
|
||||||
|
executable {
|
||||||
|
// Change to specify fully qualified name of your application's entry point:
|
||||||
|
entryPoint = 'sample.main'
|
||||||
|
// Specify command-line arguments, if necessary:
|
||||||
|
runTask?.args('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sourceSets {
|
||||||
|
// Note: To enable common source sets please comment out 'kotlin.import.noCommonSourceSets' property
|
||||||
|
// in gradle.properties file and re-import your project in IDE.
|
||||||
|
macosMain {
|
||||||
|
}
|
||||||
|
macosTest {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use the following Gradle tasks to run your application:
|
||||||
|
// :runReleaseExecutableMacos - without debug symbols
|
||||||
|
// :runDebugExecutableMacos - with debug symbols
|
||||||
|
|
||||||
12
hello_world_native/build.json
Normal file
12
hello_world_native/build.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"java": "1.8",
|
||||||
|
"builder": {
|
||||||
|
"name": "gradle",
|
||||||
|
"version": "5.5"
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"dependencies": [
|
||||||
|
"me.hatter:commons:3.5"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
10
hello_world_native/settings.gradle
Normal file
10
hello_world_native/settings.gradle
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
pluginManagement {
|
||||||
|
resolutionStrategy {
|
||||||
|
eachPlugin {
|
||||||
|
if (requested.id.id == "kotlin-multiplatform") {
|
||||||
|
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rootProject.name = 'kotlin-hands-on-intro-kotlin-native'
|
||||||
6
hello_world_native/src/macosMain/kotlin/sample/Main.kt
Normal file
6
hello_world_native/src/macosMain/kotlin/sample/Main.kt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
println("Hello World!")
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user