Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit d0a46d1

Browse files
20210825
1 parent 9c08238 commit d0a46d1

File tree

7 files changed

+11
-108
lines changed

7 files changed

+11
-108
lines changed

.gitignore

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -41,78 +41,17 @@ gradle-app.setting
4141
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
4242
# gradle/wrapper/gradle-wrapper.properties
4343

44-
### JetBrains template
45-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
46-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
4744

48-
# User-specific stuff
49-
.idea/**/workspace.xml
50-
.idea/**/tasks.xml
51-
.idea/**/usage.statistics.xml
52-
.idea/**/dictionaries
53-
.idea/**/shelf
54-
55-
# Generated files
56-
.idea/**/contentModel.xml
57-
58-
# Sensitive or high-churn files
59-
.idea/**/dataSources/
60-
.idea/**/dataSources.ids
61-
.idea/**/dataSources.local.xml
62-
.idea/**/sqlDataSources.xml
63-
.idea/**/dynamic.xml
64-
.idea/**/uiDesigner.xml
65-
.idea/**/dbnavigator.xml
66-
67-
# Gradle
68-
.idea/**/gradle.xml
69-
.idea/**/libraries
70-
71-
# Gradle and Maven with auto-import
72-
# When using Gradle or Maven with auto-import, you should exclude module files,
73-
# since they will be recreated, and may cause churn. Uncomment if using
74-
# auto-import.
75-
# .idea/artifacts
76-
# .idea/compiler.xml
77-
# .idea/jarRepositories.xml
78-
# .idea/modules.xml
79-
# .idea/*.iml
80-
# .idea/modules
81-
# *.iml
82-
# *.ipr
83-
84-
# CMake
45+
.idea/*
8546
cmake-build-*/
86-
87-
# Mongo Explorer plugin
88-
.idea/**/mongoSettings.xml
89-
90-
# File-based project format
9147
*.iws
9248

9349
# IntelliJ
9450
out/
95-
96-
# mpeltonen/sbt-idea plugin
9751
.idea_modules/
98-
99-
# JIRA plugin
10052
atlassian-ide-plugin.xml
101-
102-
# Cursive Clojure plugin
103-
.idea/replstate.xml
104-
105-
# Crashlytics plugin (for Android Studio and IntelliJ)
10653
com_crashlytics_export_strings.xml
10754
crashlytics.properties
10855
crashlytics-build.properties
10956
fabric.properties
110-
111-
112-
# Android studio 3.1+ serialized cache file
113-
.idea
114-
.idea/*
115-
116-
117-
11857
!.gitkeep

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

build.gradle.kts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,18 @@ version = "last"
66
buildscript {
77
repositories {
88
mavenLocal()
9-
maven { url = project.uri("https://maven.aliyun.com/repository/public/") }
10-
maven { url = project.uri("https://mirrors.163.com/maven/repository/maven-public/") }
11-
// maven 中国镜像,提供加速
129
mavenCentral()
13-
maven { url = project.uri("https://jitpack.io") }
1410
}
1511

16-
val kotlinVersion = "1.4.32"
17-
1812
dependencies {
19-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
13+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21")
2014
}
2115
}
2216

2317
allprojects {
2418
repositories {
2519
mavenLocal()
26-
maven { url = project.uri("https://maven.aliyun.com/repository/gradle-plugin/") }
27-
maven { url = project.uri("https://maven.aliyun.com/repository/public/") }
28-
maven { url = project.uri("https://mirrors.163.com/maven/repository/maven-public/") }
29-
// maven 中国镜像,提供加速
3020
mavenCentral()
31-
maven { url = project.uri("https://jitpack.io") }
3221
}
3322
}
3423

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

project-cli/build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
application
55
kotlin("jvm")
66
id("org.openjfx.javafxplugin") version "0.0.10"
7-
id("org.beryx.jlink") version "2.23.8"
7+
id("org.beryx.jlink") version "2.24.1"
88
}
99

1010
val mainClassStr = "com.github.template.MainKt"
@@ -18,15 +18,15 @@ javafx {
1818
dependencies {
1919
implementation(kotlin("reflect"))
2020
implementation(kotlin("stdlib"))
21-
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
22-
testImplementation("org.junit.platform:junit-platform-launcher:1.6.2")
21+
testImplementation("org.junit.jupiter:junit-jupiter:5.7.2")
22+
testImplementation("org.junit.platform:junit-platform-launcher:1.7.2")
2323
}
2424

2525
java.sourceCompatibility = JavaVersion.VERSION_11
2626

2727
val compileKotlin: KotlinCompile by tasks
2828
val compileJava: JavaCompile by tasks
29-
compileJava.destinationDir = compileKotlin.destinationDir
29+
compileJava.destinationDirectory.set(compileKotlin.destinationDirectory.get())
3030

3131
java {
3232
modularity.inferModulePath.set(true)
@@ -38,8 +38,8 @@ application {
3838
}
3939

4040
jlink {
41-
options.addAll("--strip-debug","--compress","2","--no-header-files","--no-man-pages")
42-
launcher{
41+
options.addAll("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
42+
launcher {
4343
name = "template"
4444
jvmArgs = arrayListOf()
4545
}
@@ -55,6 +55,3 @@ tasks.test {
5555
tasks.withType<KotlinCompile>().configureEach {
5656
kotlinOptions.jvmTarget = "11"
5757
}
58-
59-
60-

project-cli/src/main/kotlin/com/github/template/main.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ import javafx.scene.layout.VBox
1010
import javafx.scene.text.Font
1111
import javafx.stage.Stage
1212

13-
1413
class Main : Application() {
1514
override fun start(primaryStage: Stage) {
1615
val root = VBox()
1716
root.alignment = Pos.CENTER
1817
val label = Label("Hello World.")
1918
val button = Button("CLICK")
2019
button.id = "button"
21-
VBox.setMargin(button, Insets(30.0,0.0,0.0,0.0))
20+
VBox.setMargin(button, Insets(30.0, 0.0, 0.0, 0.0))
2221
button.setOnAction {
2322
button.text = "ACCEPT"
2423
println("ACCEPT")
2524
}
26-
root.children.addAll(label,button)
25+
root.children.addAll(label, button)
2726
label.font = Font.font(24.0)
2827
primaryStage.scene = Scene(root, 800.0, 600.0)
2928
primaryStage.title = "Main"

settings.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
rootProject.name = "GradleJavaFXKotlinTemplate"
22
// 你可以修改此名称作为项目名称
33
include("project-cli")
4-

0 commit comments

Comments
 (0)