Skip to content

Commit f8c42fb

Browse files
andseljsvd
andauthored
Fix deprecations for Gradle 8.7 (logstash-plugins#18)
Upgrade Gradle to 8.7 and fix deprecations. Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
1 parent 090142d commit f8c42fb

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

build.gradle

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
import java.nio.file.Files
22
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING
33

4+
buildscript {
5+
repositories {
6+
mavenCentral()
7+
gradlePluginPortal()
8+
}
9+
}
10+
11+
plugins {
12+
id 'com.github.johnrengelman.shadow' version '8.1.1'
13+
id 'java'
14+
}
15+
416
ext {
5-
snakeYamlVersion = '2.2'
17+
snakeYamlVersion = '2.2'
18+
shadowGradlePluginVersion = '8.1.1'
619
}
720

8-
apply plugin: 'java'
21+
922
apply from: LOGSTASH_CORE_PATH + "/../rubyUtils.gradle"
1023

1124
// ===========================================================================
@@ -24,29 +37,19 @@ pluginInfo.pluginClass = "JavaInputExample"
2437
pluginInfo.pluginName = "java_input_example" // must match the @LogstashPlugin annotation in the main plugin class
2538
// ===========================================================================
2639

27-
sourceCompatibility = 11
28-
targetCompatibility = 11
29-
30-
buildscript {
31-
repositories {
32-
mavenCentral()
33-
gradlePluginPortal()
34-
jcenter()
35-
}
36-
37-
dependencies {
38-
classpath 'com.github.johnrengelman:shadow:8.1.1'
39-
}
40+
java {
41+
sourceCompatibility = JavaVersion.VERSION_11
42+
targetCompatibility = JavaVersion.VERSION_11
4043
}
4144

45+
4246
repositories {
4347
mavenCentral()
4448
}
4549

46-
apply plugin: 'com.github.johnrengelman.shadow'
4750

4851
shadowJar {
49-
archiveClassifier = null
52+
archiveClassifier.set('')
5053
}
5154

5255
dependencies {

0 commit comments

Comments
 (0)