Skip to content

Commit

Permalink
Added log4j dependency and Java compatibility version
Browse files Browse the repository at this point in the history
  • Loading branch information
Shabaz Basha Kowthalam committed Nov 13, 2024
1 parent da692a2 commit 6a5bfc0
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,32 @@ plugins {
id 'java'
}

repositories {
mavenCentral()
}

defaultTasks("dist")

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

dependencies {
// Add Log4j core and API as dependencies (update version as needed)
implementation 'org.apache.logging.log4j:log4j-core:2.24.1'
implementation 'org.apache.logging.log4j:log4j-api:2.24.1'
}

// Task to copy dependencies to the lib directory
tasks.register('copyDependencies', Copy) {
from configurations.runtimeClasspath
into "build/libs"
}

tasks.register("dist", Zip) {

dependsOn("build")
dependsOn("copyDependencies", "build")

from("build/libs") {
include("*.jar")
Expand Down

0 comments on commit 6a5bfc0

Please sign in to comment.