Skip to content

Commit 3e43456

Browse files
committed
Sync gradle scripts between projects
1 parent 80a47a6 commit 3e43456

File tree

6 files changed

+20
-13
lines changed

6 files changed

+20
-13
lines changed

Agent/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ plugins {
66
}
77

88
dependencies {
9-
include "org.ow2.asm:asm:9.8"
10-
include "org.ow2.asm:asm-tree:9.8"
9+
includeInJar "org.ow2.asm:asm:9.8"
10+
includeInJar "org.ow2.asm:asm-tree:9.8"
1111
}
1212

1313
jar {

buildSrc/src/main/groovy/base.application-conventions.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "application"
3-
id "base.include-configuration"
3+
id "base.include-in-jar-configuration"
44
id "base.exclude-run-folder"
55
}
66

buildSrc/src/main/groovy/base.base-conventions.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ repositories {
1111
}
1212

1313
jar {
14-
var projectName = project.name
15-
from("LICENSE") {
16-
rename { "${it}_${projectName}" }
14+
if (layout.projectDirectory.file("LICENSE").asFile.exists()) {
15+
def projectName = project.name
16+
from(layout.projectDirectory.file("LICENSE")) {
17+
rename { "${it}_${projectName}" }
18+
}
19+
} else if (rootProject.layout.projectDirectory.file("LICENSE").asFile.exists()) {
20+
def projectName = rootProject.name
21+
from(rootProject.layout.projectDirectory.file("LICENSE")) {
22+
rename { "${it}_${projectName}" }
23+
}
1724
}
1825
}
1926

buildSrc/src/main/groovy/base.exclude-run-folder.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
idea {
66
module {
77
["run"].each {
8-
excludeDirs << file("$it")
8+
excludeDirs << layout.projectDirectory.file("$it").asFile
99
}
1010
}
1111
}

buildSrc/src/main/groovy/base.include-configuration.gradle renamed to buildSrc/src/main/groovy/base.include-in-jar-configuration.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
configurations {
2-
include
2+
includeInJar
33

4-
implementation.extendsFrom(include)
5-
api.extendsFrom(include)
4+
implementation.extendsFrom(includeInJar)
5+
api.extendsFrom(includeInJar)
66
}
77

88
jar {
9-
dependsOn(configurations.include)
9+
dependsOn(configurations.includeInJar)
1010
from {
1111
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
12-
configurations.include.collect {
12+
configurations.includeInJar.collect {
1313
zipTree(it)
1414
}
1515
} {

buildSrc/src/main/groovy/viaproxy.plugin-conventions.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id "java-library"
33
id "base.base-conventions"
4-
id "base.include-configuration"
4+
id "base.include-in-jar-configuration"
55
id "viaproxy.run-with-viaproxy-task"
66
}
77

0 commit comments

Comments
 (0)