File tree Expand file tree Collapse file tree 5 files changed +24
-17
lines changed
Expand file tree Collapse file tree 5 files changed +24
-17
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ plugins {
44}
55
66configurations {
7- repackagedInclude
7+ repackagedIncludeInJar
88
9- include . extendsFrom(repackagedInclude )
9+ includeInJar . extendsFrom(repackagedIncludeInJar )
1010}
1111
1212repositories {
@@ -26,21 +26,21 @@ dependencies {
2626 transitive = false
2727 }
2828
29- include " net.java.dev.jna:jna:5.17.0"
29+ includeInJar " net.java.dev.jna:jna:5.17.0"
3030
3131 // For dependency sources, see RakNetBackend class
32- include " com.github.RelativityMC.netty-raknet:netty-raknet-client:ae1f415e05"
33- include (" com.github.telecran-telecrit:JRakNet:d757e139ce" ) {
32+ includeInJar " com.github.RelativityMC.netty-raknet:netty-raknet-client:ae1f415e05"
33+ includeInJar (" com.github.telecran-telecrit:JRakNet:d757e139ce" ) {
3434 exclude group : " org.apache.logging.log4j"
3535 exclude group : " io.netty"
3636 }
37- repackagedInclude (" dev.kastle.netty:netty-transport-raknet:1.2.0" ) {
37+ repackagedIncludeInJar (" dev.kastle.netty:netty-transport-raknet:1.2.0" ) {
3838 transitive = false
3939 }
4040}
4141
4242dependencyRepackager {
43- configuration = configurations. repackagedInclude
43+ configuration = configurations. repackagedIncludeInJar
4444 relocations = [
4545 " org.cloudburstmc.netty" : " dev.kastle.netty"
4646 ]
Original file line number Diff line number Diff line change @@ -11,9 +11,16 @@ repositories {
1111}
1212
1313jar {
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
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
55idea {
66 module {
77 [" run" ]. each {
8- excludeDirs << file(" $it " )
8+ excludeDirs << layout . projectDirectory . file(" $it " ). asFile
99 }
1010 }
1111}
Original file line number Diff line number Diff line change 11configurations {
2- include
2+ includeInJar
33
4- implementation. extendsFrom(include )
5- api. extendsFrom(include )
4+ implementation. extendsFrom(includeInJar )
5+ api. extendsFrom(includeInJar )
66}
77
88jar {
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 } {
Original file line number Diff line number Diff line change 11plugins {
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
You can’t perform that action at this time.
0 commit comments