Skip to content

Commit 0c807f5

Browse files
committed
smallest version of R8
1 parent c48409e commit 0c807f5

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

example/android/kotlinlib/1-hello-kotlin/app/proguard-rules.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Add project specific ProGuard rules here.
22
# You can control the set of applied configuration files using the
3-
# proguardFiles setting in build.gradle.
3+
# override def proguardReleaseConfigs: T[Seq[PathRef]] in build.mill
4+
45
#
56
# For more details, see
67
# http://developer.android.com/guide/developing/tools/proguard.html

scalalib/src/mill/javalib/android/AndroidAppModule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ trait AndroidAppModule extends AndroidModule {
792792

793793
val r8ArgsBuilder = Seq.newBuilder[String]
794794

795-
r8ArgsBuilder += androidSdkModule().r8Path().path.toString
795+
r8ArgsBuilder += androidSdkModule().r8Exe().path.toString
796796

797797
if (androidIsDebug())
798798
r8ArgsBuilder += "--debug"

scalalib/src/mill/javalib/android/AndroidModule.scala

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -724,12 +724,10 @@ trait AndroidModule extends JavaModule {
724724
)
725725
}
726726

727-
// Additional library classes (if any) that should be treated as provided
727+
/** Additional library classes (if any) that should be treated as provided */
728728
def libraryClassesPaths: T[Seq[PathRef]] = T {
729729
Seq(
730730
androidSdkModule().androidJarPath(),
731-
androidSdkModule().r8LibPath(),
732-
androidSdkModule().r8LibClasspath(),
733731
androidSdkModule().androidCoreModulesPath(),
734732
androidSdkModule().androidOptionalApacheHttpLegacy(),
735733
androidSdkModule().androidOptionalCar(),
@@ -743,25 +741,31 @@ trait AndroidModule extends JavaModule {
743741
true
744742
}
745743

746-
// Specifies the path to the main-dex rules file, which contains ProGuard rules
747-
// for determining which classes should be included in the primary DEX file.
744+
/**
745+
* Specifies the path to the main-dex rules file, which contains ProGuard rules
746+
* for determining which classes should be included in the primary DEX file.
747+
*/
748748
def mainDexRules: T[Option[PathRef]] = T {
749749
Some(PathRef(androidResources()._1.path / "main-dex-rules.pro"))
750750
}
751751

752-
// Returns the path to the main-dex list file, which explicitly lists the classes
753-
// to be included in the primary DEX file. Currently, this is not defined.
752+
/**
753+
* Returns the path to the main-dex list file, which explicitly lists the classes
754+
* to be included in the primary DEX file. Currently, this is not defined.
755+
*/
754756
def mainDexList: T[Option[PathRef]] = T {
755757
None
756758
}
757759

758-
// Provides the output path for the generated main-dex list file, which is used
759-
// during the DEX generation process.
760+
/**
761+
* Provides the output path for the generated main-dex list file, which is used
762+
* during the DEX generation process.
763+
*/
760764
def mainDexListOutput: T[Option[PathRef]] = T {
761765
Some(androidModuleGeneratedSourcesFunc().mainDexListOutput)
762766
}
763767

764-
// Optional baseline profile for ART rewriting
768+
/** Optional baseline profile for ART rewriting */
765769
def baselineProfile: T[Option[PathRef]] = T {
766770
None
767771
}

scalalib/src/mill/javalib/android/AndroidSdkModule.scala

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,10 @@ trait AndroidSdkModule extends Module {
208208
*
209209
* @return A task containing a [[PathRef]] pointing to the r8 directory.
210210
*/
211-
def r8Path: T[PathRef] = Task {
211+
def r8Exe: T[PathRef] = Task {
212212
PathRef(sdkPath().path / "cmdline-tools/latest/bin/r8")
213213
}
214214

215-
def r8LibPath: T[PathRef] = Task {
216-
PathRef(sdkPath().path / "cmdline-tools/latest/lib/r8.jar")
217-
}
218-
219-
def r8LibClasspath: T[PathRef] = Task {
220-
PathRef(sdkPath().path / "cmdline-tools/latest/lib/r8-classpath.jar")
221-
}
222-
223215
/**
224216
* Installs the necessary Android SDK components such as platform-tools, build-tools, and Android platforms.
225217
*

0 commit comments

Comments
 (0)