Skip to content

Commit 8490bca

Browse files
committed
fix blocks
1 parent ea07f13 commit 8490bca

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ plugins {
1515

1616
group = "org.scratchapi"
1717
version = (System.getenv("GITHUB_REF_NAME")?.removePrefix("v")
18-
?: "0.0.1a3")
18+
?: "0.0.1a5")
1919

2020
java {
2121
withJavadocJar()

src/main/kotlin/org/scratchapi/scratchdsl/Build.kt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ class BuildRoot internal constructor() : Representable<Representation> {
238238
val assetDirectories = mutableListOf<Path>()
239239

240240
override fun represent() = buildJsonObject {
241+
targets.forEach {
242+
it.builder?.let { it1 -> it1(it) }
243+
}
241244
targets.forEach(SpriteBuilder::prepareRepresent)
242245
put("targets", buildJsonArray {
243246
targets.forEach { target ->
@@ -429,16 +432,16 @@ class BuildRoot internal constructor() : Representable<Representation> {
429432
) = stage.addBackdrop(path, name)
430433
}
431434

432-
val httpClient = OkHttpClient()
433-
434-
fun getHttp(url: String): ByteArray? {
435-
val request = Request.Builder()
436-
.url(url)
437-
.build()
438-
439-
val response = httpClient.newCall(request).execute()
440-
return response.body?.bytes()
441-
}
435+
//val httpClient = OkHttpClient()
436+
//
437+
//fun getHttp(url: String): ByteArray? {
438+
// val request = Request.Builder()
439+
// .url(url)
440+
// .build()
441+
//
442+
// val response = httpClient.newCall(request).execute()
443+
// return response.body?.bytes()
444+
//}
442445

443446
class StageBuilder internal constructor(root: BuildRoot) : HatBlockHost {
444447
internal val spriteBuilder = SpriteBuilder(root)

0 commit comments

Comments
 (0)