Skip to content

Commit

Permalink
Non transitive R
Browse files Browse the repository at this point in the history
  • Loading branch information
alorma committed Oct 24, 2023
1 parent f04f6b3 commit 48b8fb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ org.gradle.vfs.watch=true
#org.gradle.unsafe.configuration-cache-problems=warn
#org.gradle.unsafe.configuration-cache.max-problems=100
signing.gnupg.executable=gpg
android.nonTransitiveRClass=false
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ColorResourceTypeTest {

@Test
fun color_resource_type_color_attr() {
val type = com.google.android.material.R.attr.colorPrimary.colorResourceType
val type = R.attr.colorPrimary.colorResourceType
assertEquals(type, ColorResourceType.COLOR_ATTR)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void checkColorList_whenDefault() {

@Test
public void checkColorAttribute() {
assertTextColorIs(R.id.textColorAttribute, com.google.android.material.R.attr.colorPrimary);
assertTextColorIsNot(R.id.textColorAttribute, com.google.android.material.R.attr.colorError);
assertTextColorIs(R.id.textColorAttribute, R.attr.colorPrimary);
assertTextColorIsNot(R.id.textColorAttribute, R.attr.colorError);
}

@Test
Expand Down Expand Up @@ -84,7 +84,7 @@ public void checkSimpleColor_fails() {

@Test(expected = BaristaException.class)
public void checkColorAttr_fails() {
assertTextColorIs(R.id.textColorAttribute, com.google.android.material.R.attr.colorError);
assertTextColorIs(R.id.textColorAttribute, R.attr.colorError);
}

@Test(expected = BaristaException.class)
Expand All @@ -99,7 +99,7 @@ public void checkNotSimpleColor_fails() {

@Test(expected = BaristaException.class)
public void checkNotColorAttr_fails() {
assertTextColorIsNot(R.id.textColorAttribute, com.google.android.material.R.attr.colorPrimary);
assertTextColorIsNot(R.id.textColorAttribute, R.attr.colorPrimary);
}

@Test(expected = BaristaException.class)
Expand Down

0 comments on commit 48b8fb1

Please sign in to comment.