Skip to content

Commit 6388e54

Browse files
committed
gradle platform
1 parent 770e083 commit 6388e54

File tree

10 files changed

+6764
-0
lines changed

10 files changed

+6764
-0
lines changed

gradle/.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+

gradle/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build

gradle/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*
4+
* This is a general purpose Gradle build.
5+
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.2/samples
6+
*/
58.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradle/gradlew

Lines changed: 234 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradle/gradlew.bat

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradle/platform/build.gradle.kts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import groovy.xml.XmlSlurper
2+
import groovy.xml.slurpersupport.GPathResult
3+
import groovy.xml.slurpersupport.NodeChild
4+
5+
plugins {
6+
`java-platform`
7+
}
8+
9+
tasks {
10+
register<Exec>("eff.xml") {
11+
commandLine("bash", "-c", "mvn -B -f \"../../pom.xml\" help:effective-pom | grep -A9999999 '^<?xml' | grep -B9999999 '^</project>' > eff.xml")
12+
}
13+
}
14+
15+
dependencies {
16+
operator fun GPathResult.div(child: String) = children().find { (it!! as NodeChild).name() == child } as GPathResult
17+
val deps = XmlSlurper().parse("platform/eff.xml") / "dependencyManagement" / "dependencies"
18+
constraints {
19+
deps.children().forEach {
20+
val node = it!! as NodeChild
21+
val g = node / "groupId"
22+
val a = node / "artifactId"
23+
val v = node / "version"
24+
api("$g:$a:$v")
25+
// println("$g:$a:$v")
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)