Skip to content

Commit 8bc86f5

Browse files
committed
fmt
1 parent 481435f commit 8bc86f5

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

libs/androidlib/src/mill/androidlib/AndroidAppModule.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ trait AndroidAppModule extends AndroidModule { outer =>
217217
.map(PathRef(_))
218218
.toSeq
219219
}
220+
220221
/**
221222
* Packages DEX files and Android resources into an unsigned APK.
222223
*
@@ -699,7 +700,7 @@ trait AndroidAppModule extends AndroidModule { outer =>
699700
pathRef
700701
}
701702

702-
//TODO consider managing with proguard and/or r8
703+
// TODO consider managing with proguard and/or r8
703704
private def isExcludedFromPackaging(relPath: RelPath): Boolean = {
704705
val topPath = relPath.segments.head
705706
// TODO do this better
@@ -797,7 +798,6 @@ trait AndroidAppModule extends AndroidModule { outer =>
797798
)
798799
}
799800

800-
801801
/**
802802
* Provides the output path for the generated main-dex list file, which is used
803803
* during the DEX generation process.
@@ -858,7 +858,7 @@ trait AndroidAppModule extends AndroidModule { outer =>
858858
if (buildSettings.isMinifyEnabled) {
859859
androidR8Dex()
860860
} else
861-
androidD8DexArgs()
861+
androidD8Dex()
862862
}
863863

864864
Task.log.debug("Building dex with command: " + dexCliArgs.mkString(" "))
@@ -869,9 +869,8 @@ trait AndroidAppModule extends AndroidModule { outer =>
869869

870870
}
871871

872-
873872
// uses the d8 tool to generate the dex file, when minification is disabled
874-
private def androidD8DexArgs: T[(PathRef, Seq[String])] = Task {
873+
private def androidD8Dex: T[(PathRef, Seq[String])] = Task {
875874

876875
val outPath = T.dest
877876

@@ -923,7 +922,6 @@ trait AndroidAppModule extends AndroidModule { outer =>
923922
PathRef(outPath) -> d8Args
924923
}
925924

926-
927925
// uses the R8 tool to generate the dex (to shrink and obfuscate)
928926
private def androidR8Dex: Task[(PathRef, Seq[String])] = Task {
929927
val destDir = T.dest / "minify"
@@ -1066,7 +1064,7 @@ trait AndroidAppModule extends AndroidModule { outer =>
10661064
override def androidCompileSdk: T[Int] = outer.androidCompileSdk()
10671065
override def androidMinSdk: T[Int] = outer.androidMinSdk()
10681066
override def androidTargetSdk: T[Int] = outer.androidTargetSdk()
1069-
1067+
10701068
override def androidIsDebug: T[Boolean] = Task { true }
10711069

10721070
override def androidApplicationId: String = outer.androidApplicationId

libs/androidlib/src/mill/androidlib/AndroidBuildTypeSettings.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ import mill.define.JsonFormatters.pathReadWrite
99
*
1010
* Useful for getting different packaging strategies for code shrinking and
1111
* supporting build variants
12-
*
1312
*/
1413
case class AndroidBuildTypeSettings(
15-
isMinifyEnabled: Boolean = false,
16-
isShrinkEnabled: Boolean = false,
17-
enableDesugaring: Boolean = false,
18-
proguardFiles: ProguardFiles = ProguardFiles()
14+
isMinifyEnabled: Boolean = false,
15+
isShrinkEnabled: Boolean = false,
16+
enableDesugaring: Boolean = false,
17+
proguardFiles: ProguardFiles = ProguardFiles()
1918
) {
2019
def withProguardLocalFiles(localFiles: Seq[os.Path]): AndroidBuildTypeSettings =
2120
copy(proguardFiles = proguardFiles.copy(localFiles = localFiles))
2221
}
2322

2423
case class ProguardFiles(
25-
defaultProguardFile: Option[String] = None,
26-
localFiles: Seq[os.Path] = List.empty
24+
defaultProguardFile: Option[String] = None,
25+
localFiles: Seq[os.Path] = List.empty
2726
)
2827

2928
object AndroidBuildTypeSettings {
30-
implicit val resultRW: upickle.default.ReadWriter[AndroidBuildTypeSettings] = upickle.default.macroRW
29+
implicit val resultRW: upickle.default.ReadWriter[AndroidBuildTypeSettings] =
30+
upickle.default.macroRW
3131
}
3232

3333
object ProguardFiles {
3434
implicit val resultRW: upickle.default.ReadWriter[ProguardFiles] = upickle.default.macroRW
35-
}
35+
}

libs/androidlib/src/mill/androidlib/AndroidModuleGeneratedDexVariants.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ package mill.androidlib
33
import mill.define.PathRef
44

55
case class AndroidModuleGeneratedDexVariants(
6-
androidDebugDex: PathRef,
7-
androidReleaseDex: PathRef,
8-
mainDexListOutput: PathRef
9-
)
6+
androidDebugDex: PathRef,
7+
androidReleaseDex: PathRef,
8+
mainDexListOutput: PathRef
9+
)
1010

1111
object AndroidModuleGeneratedDexVariants {
1212
implicit def resultRW: upickle.default.ReadWriter[AndroidModuleGeneratedDexVariants] =
1313
upickle.default.macroRW
1414
}
15-

libs/androidlib/src/mill/androidlib/AndroidSdkModule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ trait AndroidSdkModule extends Module {
199199
}
200200

201201
/**
202-
* Location of the default proguard optimisation config.
202+
* Location of the default proguard optimisation config.
203203
* See also [[https://developer.android.com/build/shrink-code]]
204204
*/
205205
def androidProguardPath: T[PathRef] = Task {

0 commit comments

Comments
 (0)