Skip to content

Commit

Permalink
Use Gradle's Kotlin DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
aecio committed Aug 17, 2023
1 parent 28a49f6 commit c79e62c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 29 deletions.
21 changes: 0 additions & 21 deletions ache-dashboard/build.gradle

This file was deleted.

24 changes: 24 additions & 0 deletions ache-dashboard/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import com.github.gradle.node.npm.task.NpmTask

plugins {
id("com.github.node-gradle.node") version "3.5.1"
}

node {
// Enable automatic download and install local copy of Node/NPM
download.set(true)
// Version of Node.js to use.
version.set("18.14.2")
// Version of npm to use.
npmVersion.set("9.5.0")
}

val dashboardBuildTask = tasks.register<NpmTask>("build") {
dependsOn(tasks.npmInstall)
npmCommand.set(listOf("run", "build"))
}

val dashboardInstallTask = tasks.register<Copy>("install") {
from("${projectDir}/build/")
into("${rootProject.projectDir}/ache/src/main/resources/public/")
}
25 changes: 17 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
plugins {
id 'java'
id("java")
}

subprojects {
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.named('test', Test) {
useJUnitPlatform()
}

subprojects {

repositories {
mavenCentral()
}

test {
useJUnitPlatform()
}

// Dependencies used by multiple sub-projects
ext.libraries = [
// testing
Expand All @@ -28,3 +31,9 @@ subprojects {
logback: [group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.5'],
]
}






0 comments on commit c79e62c

Please sign in to comment.