Skip to content

Commit cf0f598

Browse files
authored
Merge pull request #149 from MovingBlocks/kotlin
convert main build.gradle to build.gradle.kts
2 parents 230c9fc + b2e9530 commit cf0f598

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,13 @@
22
A family of libraries providing a variety of core capabilities for use by games and game engines.
33

44
For documentations and usage examples, see https://github.com/MovingBlocks/gestalt/wiki
5+
6+
## Development
7+
To build locally, use `gradlew jar`.
8+
### Android Set-Up (optional)
9+
To build `gestalt-android`, you will need to:
10+
* Download the Android SDK and use the `sdkmanager` tool to install the API 30 build tools.
11+
* Create a `local.properties` file in the repository root containing:
12+
`sdk.dir=<SDK_ROOT>`,
13+
where <SDK_ROOT> is the directory in which you installed the Android SDK.
14+

build.gradle renamed to build.gradle.kts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ buildscript {
1010
google()
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:7.4.1'
13+
classpath("com.android.tools.build:gradle:7.4.1")
1414
}
1515
}
1616

1717
plugins {
18-
id 'idea'
18+
id("idea")
1919
}
2020

2121
allprojects {
@@ -25,24 +25,24 @@ allprojects {
2525

2626
// Terasology Artifactory instance for libs not readily available elsewhere plus our own libs
2727
maven {
28-
def repoViaEnv = System.getenv()["RESOLUTION_REPO"]
28+
val repoViaEnv = System.getenv("RESOLUTION_REPO")
2929
if (rootProject.hasProperty("alternativeResolutionRepo")) {
3030
// If the user supplies an alternative repo via gradle.properties then use that
31-
name "from alternativeResolutionRepo property"
32-
url alternativeResolutionRepo
33-
} else if (repoViaEnv != null && repoViaEnv != "") {
34-
name "from \$RESOLUTION_REPO"
35-
url = repoViaEnv
31+
name = "from alternativeResolutionRepo property"
32+
url = uri(rootProject.property("alternativeResolutionRepo") as String)
33+
} else if (!repoViaEnv.isNullOrEmpty()) {
34+
name = "from \$RESOLUTION_REPO"
35+
url = uri(repoViaEnv)
3636
} else {
3737
// Our default is the main virtual repo containing everything except repos for testing Artifactory itself
38-
name "Terasology Artifactory"
39-
url "https://artifactory.terasology.io/artifactory/virtual-repo-live"
38+
name = "Terasology Artifactory"
39+
url = uri("https://artifactory.terasology.io/artifactory/virtual-repo-live")
4040
}
4141
}
4242

4343
// SemVer lib
4444
maven {
45-
url 'https://heisluft.de/maven'
45+
url = uri("https://heisluft.de/maven")
4646
}
4747
}
4848
}

gestalt-android/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ project.afterEvaluate {
146146
}
147147
}
148148

149-
// List all "compile" dependencies (for old Gradle)
150-
configurations.compile.getDependencies().each { dep -> addDependency(dep, "compile") }
151149
// List all "api" dependencies (for new Gradle) as "compile" dependencies
152150
configurations.api.getDependencies().each { dep -> addDependency(dep, "compile") }
153151
// List all "implementation" dependencies (for new Gradle) as "runtime" dependencies

0 commit comments

Comments
 (0)