diff --git a/build.gradle.kts b/build.gradle.kts index 1fcf3ce..0980424 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "xyz.mishkun.lobzik" -version = "0.5.0" +version = "0.6.0-SNAPSHOT" repositories { mavenCentral() @@ -33,22 +33,27 @@ gradlePlugin { } } +kotlin { + this.jvmToolchain(11) +} + val VERSION_ASM = "9.4" -val shadowed by configurations.creating { - extendsFrom(configurations.implementation.get()) -} +val shade by configurations.creating +configurations.implementation.configure { extendsFrom(shade) } dependencies { - runtimeOnly(gradleApi()) - implementation(gradleKotlinDsl()) - shadowed(project(":graph-processing")) - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.10") - implementation("com.github.doyaaaaaken:kotlin-csv-jvm:1.7.0") - implementation("com.android.tools.build:gradle-api:7.3.1") - implementation("org.ow2.asm:asm:$VERSION_ASM") - implementation("org.ow2.asm:asm-tree:$VERSION_ASM") + compileOnly(gradleApi()) + compileOnly(gradleKotlinDsl()) + shade(files("libs/gephi-toolkit-0.10.0-all.jar")) + shadow("org.jetbrains.kotlinx:kotlinx-html-jvm:0.8.0") + shadow("space.kscience:plotlykt-core:0.5.0") + shadow("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.10") + shadow("com.github.doyaaaaaken:kotlin-csv-jvm:1.7.0") + shadow("com.android.tools.build:gradle-api:7.3.1") + shadow("org.ow2.asm:asm:$VERSION_ASM") + shadow("org.ow2.asm:asm-tree:$VERSION_ASM") testImplementation(kotlin("test")) } @@ -56,8 +61,8 @@ tasks.test { useJUnitPlatform() } -tasks.named("shadowJar") { - configurations = listOf(shadowed) +tasks.withType { + configurations = listOf(shade) archiveClassifier.set("") this.isZip64 = true } diff --git a/graph-processing/build.gradle.kts b/graph-processing/build.gradle.kts deleted file mode 100644 index 5be8f60..0000000 --- a/graph-processing/build.gradle.kts +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - kotlin("jvm") -} - -repositories { - mavenCentral() - maven(url = "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") - maven(url = "https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/") -} - -kotlin { - this.jvmToolchain(11) -} - -dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.8.0") - implementation("space.kscience:plotlykt-core:0.5.0") - implementation(files("libs/gephi-toolkit-0.10.0-all.jar")) -} diff --git a/graph-processing/libs/gephi-toolkit-0.10.0-all.jar b/libs/gephi-toolkit-0.10.0-all.jar similarity index 100% rename from graph-processing/libs/gephi-toolkit-0.10.0-all.jar rename to libs/gephi-toolkit-0.10.0-all.jar diff --git a/settings.gradle.kts b/settings.gradle.kts index a217a79..b41926f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,2 +1 @@ rootProject.name = "lobzik" -include(":graph-processing") diff --git a/graph-processing/src/main/kotlin/xyz/mishkun/lobzik/graph/GraphRoutine.kt b/src/main/kotlin/xyz/mishkun/lobzik/graph/GraphRoutine.kt similarity index 97% rename from graph-processing/src/main/kotlin/xyz/mishkun/lobzik/graph/GraphRoutine.kt rename to src/main/kotlin/xyz/mishkun/lobzik/graph/GraphRoutine.kt index 9521801..5fc4609 100644 --- a/graph-processing/src/main/kotlin/xyz/mishkun/lobzik/graph/GraphRoutine.kt +++ b/src/main/kotlin/xyz/mishkun/lobzik/graph/GraphRoutine.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package xyz.mishkun.lobzik.graph import kotlinx.html.* diff --git a/graph-processing/src/main/kotlin/xyz/mishkun/lobzik/graph/ImportExport.kt b/src/main/kotlin/xyz/mishkun/lobzik/graph/ImportExport.kt similarity index 100% rename from graph-processing/src/main/kotlin/xyz/mishkun/lobzik/graph/ImportExport.kt rename to src/main/kotlin/xyz/mishkun/lobzik/graph/ImportExport.kt diff --git a/graph-processing/src/main/resources/template.html b/src/main/resources/template.html similarity index 100% rename from graph-processing/src/main/resources/template.html rename to src/main/resources/template.html