Skip to content

Commit

Permalink
Added support for Android checks
Browse files Browse the repository at this point in the history
using the publicly available Maven library 'android.jar' (and
experimental:android_runtime for our internal version). Deleted the
handwritten Android stubs.

RELNOTES: N/A
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114345338
  • Loading branch information
avenet authored and cushon committed Feb 11, 2016
1 parent dd2e665 commit 5ab7d93
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 50 deletions.
14 changes: 14 additions & 0 deletions core/pom.xml
Expand Up @@ -196,6 +196,20 @@
<version>56.1</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- Apache 2.0 -->
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- Apache 2.0 -->
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r6</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Expand Up @@ -85,7 +85,7 @@ public void testNegativeCase() throws Exception {
"import android.R;",
"public class FineStringTest {",
" public int getStringId() {",
" return R.string.maybe;",
" return R.string.copy;",
" }",
"}")
.doTest();
Expand All @@ -104,18 +104,6 @@ public void testAssumedMeanings() throws Exception {
}

private CompilationTestHelper createCompilationTestHelper() {
// Use fake android.R class to avoid compile-time dependency on Android
return
CompilationTestHelper
.newInstance(MislabeledAndroidString.class, getClass())
.addSourceLines("android/R.java",
"package android;",
"public final class R {",
" public static final class string {",
" public static final int yes = -1;",
" public static final int no = -2;",
" public static final int maybe = -3;",
" }",
"}");
return CompilationTestHelper.newInstance(MislabeledAndroidString.class, getClass());
}
}
Expand Up @@ -34,8 +34,6 @@ public class RectIntersectReturnValueIgnoredTest {
public void setUp() {
compilationHelper =
CompilationTestHelper.newInstance(RectIntersectReturnValueIgnored.class, getClass());
compilationHelper.addSourceFile("stubs/android/graphics/Rect.java");

}

@Test
Expand Down

This file was deleted.

0 comments on commit 5ab7d93

Please sign in to comment.