Skip to content

Commit 445c8fa

Browse files
committed
feat: update properties for gradle, prepare for restructure of project
1 parent 05f8fa6 commit 445c8fa

File tree

4 files changed

+82
-67
lines changed

4 files changed

+82
-67
lines changed

app/build.gradle.kts

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,21 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
/*
7-
* This file was generated by the Gradle 'init' task.
8-
*
9-
* This generated file contains a sample Kotlin application project to get you started.
10-
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
11-
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
12-
*/
13-
146
plugins {
15-
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
16-
id("org.jetbrains.kotlin.jvm") version "1.8.10"
17-
id("org.jetbrains.kotlin.plugin.noarg") version "1.8.20"
18-
kotlin("plugin.serialization") version "1.8.20"
19-
id("org.jetbrains.compose") version "1.4.0"
20-
// Apply the application plugin to add support for building a CLI application in Java.
21-
application
22-
}
23-
24-
25-
repositories {
26-
mavenCentral()
27-
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
28-
google()
7+
alias(libs.plugins.kotlin.jvm)
8+
alias(libs.plugins.compose)
299
}
3010

3111
dependencies {
32-
testImplementation(kotlin("test"))
33-
testImplementation(platform("org.junit:junit-bom:5.9.2"))
34-
testImplementation("org.junit.jupiter:junit-jupiter")
35-
implementation("org.neo4j:neo4j-ogm-core:4.0.5")
36-
runtimeOnly("org.neo4j:neo4j-ogm-bolt-driver:4.0.5")
37-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
38-
implementation("org.jetbrains.exposed", "exposed-core", "0.40.1")
39-
implementation("org.jetbrains.exposed", "exposed-dao", "0.40.1")
40-
implementation("org.jetbrains.exposed", "exposed-jdbc", "0.40.1")
41-
implementation("org.xerial:sqlite-jdbc:3.40.1.0")
42-
implementation("com.google.code.gson:gson:2.10.1")
12+
implementation(libs.gson)
13+
implementation(libs.kotlinx.serialization.json)
4314
implementation(compose.desktop.currentOs)
4415
implementation(compose.material3)
16+
implementation(project(":lib"))
4517
}
4618

47-
48-
tasks.jar {
49-
manifest.attributes["Main-Class"] = "app.AppKt"
50-
}
51-
noArg {
52-
annotation("org.neo4j.ogm.annotation.NodeEntity")
53-
annotation("org.neo4j.ogm.annotation.RelationshipEntity")
54-
}
55-
56-
application {
57-
// Define the main class for the application.
58-
mainClass.set("MainKt")
59-
}
60-
61-
tasks.test {
62-
// Use JUnit Platform for unit tests.
63-
useJUnitPlatform()
19+
compose.desktop {
20+
application {
21+
mainClass = "MainKt"
22+
}
6423
}

build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2023 teemEight
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
plugins {
7+
// this is necessary to avoid the plugins to be loaded multiple times
8+
// in each subproject's classloader
9+
alias(libs.plugins.kotlin.jvm).apply(false)
10+
}

lib/build.gradle.kts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2023 teemEight
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/*
7+
* This file was generated by the Gradle 'init' task.
8+
*
9+
* This generated file contains a sample Kotlin application project to get you started.
10+
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
11+
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
12+
*/
13+
plugins {
14+
alias(libs.plugins.kotlin.jvm)
15+
alias(libs.plugins.kotlin.serialization)
16+
alias(libs.plugins.kotlin.noarg)
17+
`java-library`
18+
}
19+
20+
dependencies {
21+
implementation(libs.kotlinx.serialization.json)
22+
23+
implementation(libs.exposed.core)
24+
implementation(libs.exposed.dao)
25+
implementation(libs.exposed.jdbc)
26+
27+
implementation(libs.neo4j.ogm.core)
28+
implementation(libs.neo4j.ogm.bolt)
29+
testImplementation(kotlin("test"))
30+
}
31+
32+
noArg {
33+
annotation("org.neo4j.ogm.annotation.NodeEntity")
34+
annotation("org.neo4j.ogm.annotation.RelationshipEntity")
35+
}
36+
37+
tasks.test {
38+
}

settings.gradle.kts

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,45 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
/*
7-
* This file was generated by the Gradle 'init' task.
8-
*
9-
* The settings file is used to specify which projects to include in your build.
10-
*
11-
* Detailed information about configuring a multi-project build in Gradle can be found
12-
* in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html
13-
*/
14-
156
rootProject.name = "trees-8"
7+
include("lib")
168
include("app")
179

10+
pluginManagement {
11+
repositories {
12+
gradlePluginPortal()
13+
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
14+
}
15+
}
16+
1817
dependencyResolutionManagement {
18+
repositories {
19+
mavenCentral()
20+
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
21+
google()
22+
}
23+
1924
versionCatalogs {
2025
create("libs") {
2126
version("kotlin", "1.8.20")
2227
plugin("kotlin-jvm", "org.jetbrains.kotlin.jvm").versionRef("kotlin")
2328
plugin("kotlin-serialization", "org.jetbrains.kotlin.plugin.serialization").versionRef("kotlin")
2429
plugin("kotlin-noarg", "org.jetbrains.kotlin.plugin.noarg").versionRef("kotlin")
30+
31+
plugin("compose", "org.jetbrains.compose").version("1.4.0")
32+
2533
library("kotlinx-serialization-json", "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
34+
library("gson", "com.google.code.gson:gson:2.10.1")
35+
36+
version("exposed", "0.41.1")
37+
library("exposed-core", "org.jetbrains.exposed", "exposed-core").versionRef("exposed")
38+
library("exposed-dao", "org.jetbrains.exposed", "exposed-dao").versionRef("exposed")
39+
library("exposed-jdbc", "org.jetbrains.exposed", "exposed-jdbc").versionRef("exposed")
40+
2641
version("neo4j-ogm", "4.0.5")
2742
library("neo4j-ogm-core", "org.neo4j", "neo4j-ogm-core").versionRef("neo4j-ogm")
2843
library("neo4j-ogm-bolt", "org.neo4j", "neo4j-ogm-bolt-driver").versionRef("neo4j-ogm")
29-
library("junit-jupiter", "org.junit.jupiter:junit-jupiter:5.9.2")
44+
3045
}
3146
}
3247
}
33-
34-
pluginManagement {
35-
repositories {
36-
gradlePluginPortal()
37-
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
38-
}
39-
}

0 commit comments

Comments
 (0)