Skip to content

Commit

Permalink
Fix bundle structure and cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
vaslabs committed Dec 21, 2024
1 parent 1048f52 commit 2a9f3bc
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public class ExampleInstrumentedTest {
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.helloworld.app2", appContext.getPackageName());
assertEquals("com.helloworld.app", appContext.getPackageName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(3, 2 + 2);
assertEquals(4, 2 + 2);
}
}
1 change: 1 addition & 0 deletions example/android/javalib/3-linting/app/lint.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<lint>
<issue id="MissingApplicationIcon" severity="ignore" />
<issue id="UnusedResources" severity="ignore" />
</lint>
8 changes: 2 additions & 6 deletions example/android/javalib/3-linting/build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ object app extends AndroidAppModule {
def androidSdkModule = mill.define.ModuleRef(androidSdkModule0)
override def releaseKeyPath = root

// Set the source path to the root directory of Java source code (com/example/app)
def sources: T[Seq[PathRef]] =
Task.Sources { Seq(PathRef(millSourcePath / "src" / "main" / "java")) }

// Set path to the custom `lint.xml` config file. It is usually at the root of the project
def androidLintConfigPath = Task { Some(PathRef(root / "lint.xml")) }

Expand Down Expand Up @@ -77,9 +73,9 @@ AndroidManifest.xml:3: Error: Avoid hardcoding the debug mode; leaving it out al
> ./mill app.androidLintRun # Rerun it for new changes to reflect

> cat out/app/androidLintRun.dest/report.txt # Check the content of report again
lint-baseline.xml: Information: 1 errors/warnings were listed in the baseline file (lint-baseline.xml) but not found in the project; perhaps they have been fixed? Unmatched issue types: HardcodedDebugMode [LintBaseline]
../../lint-baseline.xml: Information: 2 errors were filtered out because they are listed in the baseline file, ../../lint-baseline.xml [LintBaseline]

*/
*/

// == Linting with Custom Configurations

Expand Down
2 changes: 1 addition & 1 deletion scalalib/src/mill/javalib/android/AndroidAppModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ trait AndroidAppModule extends JavaModule {
os.call((androidSdkModule().aapt2Path().path, "compile", "--dir", resDir, "-o", zipPath))
}

val compiledLibsArgs = libZips.map(zip => Seq("-R", zip.toString)).flatten
val compiledLibsArgs = libZips.flatMap(zip => Seq("-R", zip.toString))

val resourceZipArg = resourceZip.headOption.map(_.toString).getOrElse("")

Expand Down

0 comments on commit 2a9f3bc

Please sign in to comment.