-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
125 lines (122 loc) · 3.57 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
plugins {
id("io.micronaut.build.license-report")
}
// When using the environment variable, these are the modules to ignore
val blockList = listOf(
"micronaut-build",
"micronaut-build-plugins",
"micronaut-comparisons",
"micronaut-crac-tests",
"micronaut-docs",
"micronaut-docs-deploy",
"micronaut-docs-index",
"micronaut-examples",
"micronaut-fuzzing",
"micronaut-guides",
"micronaut-guides-old",
"micronaut-guides-poc",
"micronaut-helidon", // Not sure what this is, but it fails locally with permissions errors
"micronaut-lambda-todo",
"micronaut-maven-plugin",
"micronaut-oauth2",
"micronaut-profiles",
"micronaut-project-template",
"micronaut-starter-ui",
)
// For local dev with no env var, these are the modules to pull
val defaultModules = listOf(
"micronaut-acme",
"micronaut-aot",
"micronaut-aws",
"micronaut-azure",
"micronaut-build",
"micronaut-cache",
"micronaut-camel",
"micronaut-cassandra",
"micronaut-coherence",
"micronaut-couchbase",
"micronaut-crac",
"micronaut-data",
"micronaut-discovery-client",
"micronaut-elasticsearch",
"micronaut-email",
"micronaut-flyway",
"micronaut-gcp",
"micronaut-gradle-plugin",
"micronaut-graphql",
"micronaut-groovy",
"micronaut-grpc",
"micronaut-hibernate-validator",
"micronaut-ignite",
"micronaut-jackson-xml",
"micronaut-jaxrs",
"micronaut-jms",
"micronaut-jmx",
"micronaut-kafka",
"micronaut-kotlin",
"micronaut-kubernetes",
"micronaut-liquibase",
"micronaut-logging",
"micronaut-micrometer",
"micronaut-microstream",
"micronaut-mongodb",
"micronaut-mqtt",
"micronaut-multitenancy",
"micronaut-nats",
"micronaut-neo4j",
"micronaut-object-storage",
"micronaut-openapi",
"micronaut-oracle-cloud",
"micronaut-picocli",
"micronaut-platform",
"micronaut-problem-json",
"micronaut-pulsar",
"micronaut-r2dbc",
"micronaut-rabbitmq",
"micronaut-reactor",
"micronaut-redis",
"micronaut-rss",
"micronaut-rxjava2",
"micronaut-rxjava3",
"micronaut-security",
"micronaut-serialization",
"micronaut-servlet",
"micronaut-session",
"micronaut-spring",
"micronaut-sql",
"micronaut-test",
"micronaut-test-resources",
"micronaut-tracing",
"micronaut-toml",
"micronaut-validation",
"micronaut-views",
)
micronautProjects {
project.providers
.environmentVariable("MICRONAUT_MODULES") // Env var from GH Action
.map { it.split(',') }
.map {
it
.filter { moduleBranch -> moduleBranch.startsWith("micronaut-") } // Has to start with 'micronaut-'
.filterNot { moduleBranch -> moduleBranch.contains("-ghsa-") } // Not a security module fork
.filterNot { moduleBranch -> blockList.contains(moduleBranch.split("@").first()) }
}
.getOrElse(defaultModules) // Fallback to the default modules if no env var
.map {
val (name, branch) = if (it.contains('@')) {
val pair = it.split('@')
if (pair.first() == "micronaut-starter") {
listOf("micronaut-starter", "4.0.x")
} else {
pair
}
} else {
listOf(it, "master")
}
Pair("https://github.com/micronaut-projects/${name}.git", branch)
}.forEach {
checkout(it.first, it.second)
}
}