Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit fac8ac6

Browse files
committed
fix: test compilation errors
1 parent f837b93 commit fac8ac6

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

utilities/lookup/build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ plugins {
2323
id("kotlin-kapt")
2424
}
2525

26-
27-
2826
dependencies {
2927
kapt(libs.google.auto.service)
3028

xml/aaptcompiler/src/main/java/com/android/aaptcompiler/ResourceTable.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ class ResourceEntry(override val name: String) : IResourceEntry {
775775
var allowNew: AllowNew? = null
776776
var overlayable: OverlayableItem? = null
777777

778-
val values = mutableListOf<ResourceConfigValue>()
778+
override val values = mutableListOf<ResourceConfigValue>()
779779

780780
override fun findValue(config: ConfigDescription, product: String): ResourceConfigValue? {
781781
return values.find { it.config == config && it.product == product }

xml/resources-api/src/main/java/com/itsaky/androidide/xml/res/IResourceEntry.kt

+1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ import com.android.aaptcompiler.ResourceConfigValue
2525
*/
2626
interface IResourceEntry {
2727
val name: String
28+
val values: Collection<ResourceConfigValue>
2829
fun findValue(config: ConfigDescription, product: String = ""): ResourceConfigValue?
2930
}

xml/utils/src/test/java/com/itsaky/androidide/xml/resources/ResourceTableRegistryTest.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class ResourceTableRegistryTest {
156156
}
157157

158158
resourceTable!!.findResource(
159-
com.android.aaptcompiler.ResourceName(
159+
ResourceName(
160160
pck = "android",
161161
type = STRING,
162162
entry = "ok"
@@ -169,15 +169,15 @@ class ResourceTableRegistryTest {
169169
assertThat(this).isNotNull()
170170
assertThat(this!!.value).isNotNull()
171171
this.value.apply {
172-
assertThat(this).isInstanceOf(com.android.aaptcompiler.BasicString::class.java)
172+
assertThat(this).isInstanceOf(BasicString::class.java)
173173
assertThat(this.toString()).isEqualTo("OK")
174174
}
175175
}
176176
}
177177

178178
resourceTable
179179
.findResource(
180-
com.android.aaptcompiler.ResourceName(
180+
ResourceName(
181181
pck = "android",
182182
type = STRING,
183183
entry = "cancel"
@@ -191,15 +191,15 @@ class ResourceTableRegistryTest {
191191
assertThat(this).isNotNull()
192192
assertThat(this!!.value).isNotNull()
193193
this.value.apply {
194-
assertThat(this).isInstanceOf(com.android.aaptcompiler.BasicString::class.java)
194+
assertThat(this).isInstanceOf(BasicString::class.java)
195195
assertThat(this.toString()).isEqualTo("Cancel")
196196
}
197197
}
198198
}
199199

200200
resourceTable
201201
.findResource(
202-
com.android.aaptcompiler.ResourceName(
202+
ResourceName(
203203
pck = "android",
204204
type = COLOR,
205205
entry = "holo_red_dark"

0 commit comments

Comments
 (0)