-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle
More file actions
48 lines (43 loc) · 1.29 KB
/
settings.gradle
File metadata and controls
48 lines (43 loc) · 1.29 KB
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
pluginManagement {
def getVersionFromToml = { versionKey ->
def tomlFile = file("gradle/libs.versions.toml")
if (!tomlFile.exists()) {
throw new GradleException("libs.versions.toml file not found!")
}
def versionPattern = ~/^\s*${versionKey}\s*=\s*"(.*?)"\s*$/
def version = null
tomlFile.eachLine { line ->
println "Checking line: ${line}"
def matcher = line =~ versionPattern
if (matcher.find()) {
println "Found ${versionKey}: ${matcher.group(1)}"
version = matcher.group(1)
}
}
if(version != null) {
return version;
}
println "Version '${versionKey}' not found in gradle/libs.versions.toml"
throw new GradleException("Version '${versionKey}' not found in libs.versions.toml")
}
repositories {
mavenLocal();
mavenCentral();
maven {
url "https://maven.fabricmc.net/"
}
maven {
url 'https://maven.wildermods.com'
}
maven {
url 'https://central.sonatype.com/repository/maven-snapshots/'
}
}
plugins {
id 'com.wildermods.workspace' version getVersionFromToml('workspace_version')
}
}
plugins {
id 'com.wildermods.workspace'
}
rootProject.name = "examplemod"