Skip to content

Commit

Permalink
resolved buildDir is deprecated issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Dec 12, 2023
1 parent de3d0c1 commit c654f35
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official
pluginName=PlumyMindustryGradlePlugin
arcVersion=v136.1
mgppVersion=1.3.0
mgppVersion=1.3.1
6 changes: 3 additions & 3 deletions main/src/io/github/liplum/mindustry/Plugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MindustryPlugin : Plugin<Project> {
val ex = target.extensions.getOrCreate<MindustryExtension>(
Mgpp.MainExtensionName
)
val assets = extensions.getOrCreate<MindustryAssetsExtension>(
extensions.getOrCreate<MindustryAssetsExtension>(
Mgpp.AssetExtensionName
)
/**
Expand Down Expand Up @@ -267,7 +267,7 @@ class MindustryAppPlugin : Plugin<Project> {
location.set(LocalGameLoc(localOverwrite))
else location.set(ex._server.location)
}
val runClient = tasks.register<RunMindustry>("runClient") {
tasks.register<RunMindustry>("runClient") {
group = Mgpp.MindustryTaskGroup
dependsOn(downloadClient)
mainClass.convention(Mgpp.MindustryDesktopMainClass)
Expand Down Expand Up @@ -303,7 +303,7 @@ class MindustryAppPlugin : Plugin<Project> {
outputtedMods.from(tasks.getByPath(it))
}
}
val runServer = tasks.register<RunMindustry>(
tasks.register<RunMindustry>(
"runServer",
) {
group = Mgpp.MindustryTaskGroup
Expand Down
2 changes: 1 addition & 1 deletion main/src/io/github/liplum/mindustry/WorkspaceCache.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inline fun Project.fetchLatestVersion(
outOfDate: Long = Mgpp.outOfDataTime,
fetch: () -> String,
): String {
val mindustry = rootProject.buildDir.resolve("mindustry")
val mindustry = rootProject.layout.buildDirectory.asFile.get().resolve("mindustry")
val jsonFile = mindustry.resolve("latest_cache.json").ensure()
val json = if (jsonFile.exists())
jsonFile.readText()
Expand Down
2 changes: 1 addition & 1 deletion main/src/io/github/liplum/mindustry/task/GenerateRClass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ open class GenerateRClass : DefaultTask() {
init {
generated.convention(project.provider {
qualifiedName.get().qualified2FileName(
project.buildDir.resolve("generated").resolve(Mgpp.Mindustry)
project.layout.buildDirectory.asFile.get().resolve("generated").resolve(Mgpp.Mindustry)
)
})
}
Expand Down

0 comments on commit c654f35

Please sign in to comment.