Skip to content

Commit f5bc7f8

Browse files
committed
update: run main kotlin
1 parent 0c0c28e commit f5bc7f8

File tree

4 files changed

+30
-17
lines changed

4 files changed

+30
-17
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
name: CI
2-
3-
env:
4-
# The name of the main module repository
5-
main_project_module: app
6-
1+
name: Main CI
72
on:
83
# Triggers the workflow on push or pull request events but only for default and protected branches
9-
push:
10-
branches: [ master ]
11-
pull_request:
12-
branches: [ master ]
134

145
workflow_dispatch:
156
# The workflow will be dispatched to the default queue
@@ -46,4 +37,16 @@ jobs:
4637

4738
# Run Build Project
4839
- name: Build gradle project
49-
run: ./gradlew build
40+
run: ./gradlew build
41+
42+
# # Run Build API
43+
# - name: Run Main
44+
# run: ./gradlew run-build-api
45+
#
46+
# - name: Sync Repository
47+
# run: |
48+
# git config user.name 'amirisback'
49+
# git config user.email '[email protected]'
50+
# git pull
51+
# git commit -am "Update Server API"
52+
# git push

build.gradle.kts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
kotlin("jvm") version "2.0.0"
2+
kotlin("jvm") version "2.0.21"
33
}
44

55
group = "io.github.amirisback"
@@ -16,6 +16,15 @@ dependencies {
1616
tasks.test {
1717
useJUnitPlatform()
1818
}
19+
1920
kotlin {
20-
jvmToolchain(21)
21+
jvmToolchain(17)
22+
}
23+
24+
tasks.register ("runMainKotlin", JavaExec::class.java) {
25+
description = "Compile and Run Main Kotlin"
26+
classpath = sourceSets["main"].runtimeClasspath
27+
// note the addition of "Kt" on the end of the class name.
28+
29+
mainClass.set("io.github.amirisback.MainKt")
2130
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#Sat Nov 09 16:41:10 WIB 2024
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
6-
zipStorePath=wrapper/dists
7+
zipStorePath=wrapper/dists

src/main/kotlin/Main.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fun main() {
66
val name = "Kotlin"
77
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
88
// to see how IntelliJ IDEA suggests fixing it.
9-
println("Hello, " + name + "!")
9+
println("Hello, $name!")
1010

1111
for (i in 1..5) {
1212
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint

0 commit comments

Comments
 (0)