diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c69d75049a6..903edfaf2cb 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -71,7 +71,7 @@ jobs: - java-version: 17 millargs: "'example.javalib.__.local.testCached'" - install-android-sdk: true + install-android-sdk: false - java-version: 17 millargs: "'example.scalalib.__.local.testCached'" @@ -79,6 +79,10 @@ jobs: - java-version: 17 millargs: "'example.kotlinlib.__.local.testCached'" + install-android-sdk: false + + - java-version: 17 + millargs: "'example.android.__.local.testCached'" install-android-sdk: true - java-version: '11' diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 08f031e3bdc..dc3fbf12c11 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -11,7 +11,6 @@ ** xref:javalib/publishing.adoc[] ** xref:javalib/build-examples.adoc[] ** xref:javalib/web-examples.adoc[] -** xref:javalib/android-examples.adoc[] * xref:scalalib/intro.adoc[] ** xref:scalalib/module-config.adoc[] ** xref:scalalib/dependencies.adoc[] @@ -29,7 +28,9 @@ ** xref:kotlinlib/publishing.adoc[] // ** xref:kotlinlib/build-examples.adoc[] ** xref:kotlinlib/web-examples.adoc[] -** xref:kotlinlib/android-examples.adoc[] +* (Experimental) Android with Mill +** xref:android/java.adoc[] +** xref:android/kotlin.adoc[] * xref:comparisons/why-mill.adoc[] ** xref:comparisons/maven.adoc[] ** xref:comparisons/gradle.adoc[] diff --git a/docs/modules/ROOT/pages/javalib/android-examples.adoc b/docs/modules/ROOT/pages/android/java.adoc similarity index 96% rename from docs/modules/ROOT/pages/javalib/android-examples.adoc rename to docs/modules/ROOT/pages/android/java.adoc index dd3ab93c09e..9eceb94a082 100644 --- a/docs/modules/ROOT/pages/javalib/android-examples.adoc +++ b/docs/modules/ROOT/pages/android/java.adoc @@ -1,4 +1,4 @@ -= (Experimental) Android Builds += Android Java Projects :page-aliases: android_app_examples.adoc include::partial$gtag-config.adoc[] @@ -17,7 +17,7 @@ These are the main Mill Modules that are relevant for building Android apps: == Simple Android Hello World Application -include::partial$example/javalib/android/1-hello-world.adoc[] +include::partial$example/android/javalib/1-hello-world.adoc[] This example demonstrates how to create a basic "Hello World" Android application using the Mill build tool. It outlines the minimum setup required to compile Java code, @@ -49,7 +49,7 @@ After creating Simple Android Application now let's focus on how to create Andro == Android App Bundle -include::partial$example/javalib/android/2-app-bundle.adoc[] +include::partial$example/android/javalib/2-app-bundle.adoc[] == Understanding `AndroidAppBundle` diff --git a/docs/modules/ROOT/pages/kotlinlib/android-examples.adoc b/docs/modules/ROOT/pages/android/kotlin.adoc similarity index 96% rename from docs/modules/ROOT/pages/kotlinlib/android-examples.adoc rename to docs/modules/ROOT/pages/android/kotlin.adoc index 19dccca63ba..64dc36270db 100644 --- a/docs/modules/ROOT/pages/kotlinlib/android-examples.adoc +++ b/docs/modules/ROOT/pages/android/kotlin.adoc @@ -1,4 +1,4 @@ -= (Experimental) Android Builds += Android Kotlin Projects :page-aliases: android_app_kotlin_examples.adoc include::partial$gtag-config.adoc[] @@ -17,7 +17,7 @@ These are the main Mill Modules that are relevant for building Android apps: == Simple Android Hello World Application -include::partial$example/kotlinlib/android/1-hello-world.adoc[] +include::partial$example/android/kotlinlib/1-hello-kotlin.adoc[] This example demonstrates how to create a basic "Hello World" Android application using the Mill build tool. It outlines the minimum setup required to compile Kotlin code, diff --git a/docs/modules/ROOT/pages/comparisons/gradle.adoc b/docs/modules/ROOT/pages/comparisons/gradle.adoc index a89b2baaa0a..4a4e2d4cca3 100644 --- a/docs/modules/ROOT/pages/comparisons/gradle.adoc +++ b/docs/modules/ROOT/pages/comparisons/gradle.adoc @@ -42,7 +42,7 @@ change any other files in the repository: The Mill build for Mockito is not 100% complete, but it covers most of the major parts of Mockito: compiling Java, running JUnit tests. For now, the Android, Kotlin, and OSGI tests are skipped, -as support for xref:javalib/android-examples.adoc[Building Android apps in Mill] +as support for xref:android/java.adoc[Building Android apps in Mill] and xref:kotlinlib/intro.adoc[Kotlin with Mill] is still experimental. The goal of this exercise is not to be 100% feature complete enough to replace the Gradle build diff --git a/docs/modules/ROOT/pages/comparisons/unique.adoc b/docs/modules/ROOT/pages/comparisons/unique.adoc index 5989fc3d209..be471c12b8e 100644 --- a/docs/modules/ROOT/pages/comparisons/unique.adoc +++ b/docs/modules/ROOT/pages/comparisons/unique.adoc @@ -81,7 +81,7 @@ It recently grew first-class Java support, demonstrating xref:comparisons/why-mill.adoc[2-10x speedups] over existing Java build tools like Maven or Gradle. Mill also has gained experimental support for Java-adjacent platforms like xref:kotlinlib/intro.adoc[Kotlin] and -xref:javalib/android-examples.adoc[Android], and has demonstrated the ability to branch out into supporting +xref:android/java.adoc[Android], and has demonstrated the ability to branch out into supporting more distant toolchains like xref:extending/example-typescript-support.adoc[Typescript] and xref:extending/example-python-support.adoc[Python]. diff --git a/example/javalib/android/1-hello-world/app/AndroidManifest.xml b/example/android/javalib/1-hello-world/app/AndroidManifest.xml similarity index 100% rename from example/javalib/android/1-hello-world/app/AndroidManifest.xml rename to example/android/javalib/1-hello-world/app/AndroidManifest.xml diff --git a/example/javalib/android/1-hello-world/app/releaseKey.jks b/example/android/javalib/1-hello-world/app/releaseKey.jks similarity index 100% rename from example/javalib/android/1-hello-world/app/releaseKey.jks rename to example/android/javalib/1-hello-world/app/releaseKey.jks diff --git a/example/javalib/android/1-hello-world/app/resources/values/colors.xml b/example/android/javalib/1-hello-world/app/resources/values/colors.xml similarity index 100% rename from example/javalib/android/1-hello-world/app/resources/values/colors.xml rename to example/android/javalib/1-hello-world/app/resources/values/colors.xml diff --git a/example/javalib/android/1-hello-world/app/resources/values/strings.xml b/example/android/javalib/1-hello-world/app/resources/values/strings.xml similarity index 100% rename from example/javalib/android/1-hello-world/app/resources/values/strings.xml rename to example/android/javalib/1-hello-world/app/resources/values/strings.xml diff --git a/example/javalib/android/1-hello-world/app/src/main/java/com/helloworld/app/MainActivity.java b/example/android/javalib/1-hello-world/app/src/main/java/com/helloworld/app/MainActivity.java similarity index 100% rename from example/javalib/android/1-hello-world/app/src/main/java/com/helloworld/app/MainActivity.java rename to example/android/javalib/1-hello-world/app/src/main/java/com/helloworld/app/MainActivity.java diff --git a/example/javalib/android/1-hello-world/build.mill b/example/android/javalib/1-hello-world/build.mill similarity index 100% rename from example/javalib/android/1-hello-world/build.mill rename to example/android/javalib/1-hello-world/build.mill diff --git a/example/javalib/android/2-app-bundle/build.mill b/example/android/javalib/2-app-bundle/build.mill similarity index 100% rename from example/javalib/android/2-app-bundle/build.mill rename to example/android/javalib/2-app-bundle/build.mill diff --git a/example/javalib/android/2-app-bundle/bundle/AndroidManifest.xml b/example/android/javalib/2-app-bundle/bundle/AndroidManifest.xml similarity index 100% rename from example/javalib/android/2-app-bundle/bundle/AndroidManifest.xml rename to example/android/javalib/2-app-bundle/bundle/AndroidManifest.xml diff --git a/example/javalib/android/2-app-bundle/bundle/releaseKey.jks b/example/android/javalib/2-app-bundle/bundle/releaseKey.jks similarity index 100% rename from example/javalib/android/2-app-bundle/bundle/releaseKey.jks rename to example/android/javalib/2-app-bundle/bundle/releaseKey.jks diff --git a/example/javalib/android/2-app-bundle/bundle/resources/values/colors.xml b/example/android/javalib/2-app-bundle/bundle/resources/values/colors.xml similarity index 100% rename from example/javalib/android/2-app-bundle/bundle/resources/values/colors.xml rename to example/android/javalib/2-app-bundle/bundle/resources/values/colors.xml diff --git a/example/javalib/android/2-app-bundle/bundle/resources/values/strings.xml b/example/android/javalib/2-app-bundle/bundle/resources/values/strings.xml similarity index 100% rename from example/javalib/android/2-app-bundle/bundle/resources/values/strings.xml rename to example/android/javalib/2-app-bundle/bundle/resources/values/strings.xml diff --git a/example/javalib/android/2-app-bundle/bundle/src/main/java/com/helloworld/app/MainActivity.java b/example/android/javalib/2-app-bundle/bundle/src/main/java/com/helloworld/app/MainActivity.java similarity index 100% rename from example/javalib/android/2-app-bundle/bundle/src/main/java/com/helloworld/app/MainActivity.java rename to example/android/javalib/2-app-bundle/bundle/src/main/java/com/helloworld/app/MainActivity.java diff --git a/example/kotlinlib/android/1-hello-world/app/AndroidManifest.xml b/example/android/kotlinlib/1-hello-kotlin/app/AndroidManifest.xml similarity index 100% rename from example/kotlinlib/android/1-hello-world/app/AndroidManifest.xml rename to example/android/kotlinlib/1-hello-kotlin/app/AndroidManifest.xml diff --git a/example/kotlinlib/android/1-hello-world/app/releaseKey.jks b/example/android/kotlinlib/1-hello-kotlin/app/releaseKey.jks similarity index 100% rename from example/kotlinlib/android/1-hello-world/app/releaseKey.jks rename to example/android/kotlinlib/1-hello-kotlin/app/releaseKey.jks diff --git a/example/kotlinlib/android/1-hello-world/app/resources/values/colors.xml b/example/android/kotlinlib/1-hello-kotlin/app/resources/values/colors.xml similarity index 100% rename from example/kotlinlib/android/1-hello-world/app/resources/values/colors.xml rename to example/android/kotlinlib/1-hello-kotlin/app/resources/values/colors.xml diff --git a/example/kotlinlib/android/1-hello-world/app/resources/values/strings.xml b/example/android/kotlinlib/1-hello-kotlin/app/resources/values/strings.xml similarity index 100% rename from example/kotlinlib/android/1-hello-world/app/resources/values/strings.xml rename to example/android/kotlinlib/1-hello-kotlin/app/resources/values/strings.xml diff --git a/example/kotlinlib/android/1-hello-world/app/src/main/java/com/helloworld/app/MainActivity.kt b/example/android/kotlinlib/1-hello-kotlin/app/src/main/java/com/helloworld/app/MainActivity.kt similarity index 100% rename from example/kotlinlib/android/1-hello-world/app/src/main/java/com/helloworld/app/MainActivity.kt rename to example/android/kotlinlib/1-hello-kotlin/app/src/main/java/com/helloworld/app/MainActivity.kt diff --git a/example/kotlinlib/android/1-hello-world/build.mill b/example/android/kotlinlib/1-hello-kotlin/build.mill similarity index 100% rename from example/kotlinlib/android/1-hello-world/build.mill rename to example/android/kotlinlib/1-hello-kotlin/build.mill diff --git a/example/package.mill b/example/package.mill index b1359bfb0db..ff7df39dfe7 100644 --- a/example/package.mill +++ b/example/package.mill @@ -27,8 +27,12 @@ object `package` extends RootModule with Module { .modules .collect { case m: ExampleCrossModule => m } + object android extends Module { + object javalib extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "javalib")) + object kotlinlib extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "kotlinlib")) + } object javalib extends Module { - object android extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "android")) + object basic extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "basic")) object module extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "module")) object dependencies extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "dependencies")) @@ -39,7 +43,6 @@ object `package` extends RootModule with Module { object web extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "web")) } object kotlinlib extends Module { - object android extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "android")) object basic extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "basic")) object module extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "module")) object dependencies extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "dependencies")) diff --git a/readme.adoc b/readme.adoc index ae06923cf30..e7fbbe5b74d 100644 --- a/readme.adoc +++ b/readme.adoc @@ -426,7 +426,7 @@ Major changes: 5. Mill now supports other JVM langauges: https://mill-build.org/mill/javalib/intro.html[Java], experimental support for https://mill-build.org/mill/kotlinlib/intro.html[Kotlin/KotlinJs], - and https://mill-build.org/mill/kotlinlib/android-examples.html[even-more-experimental support for Android]. + and https://mill-build.org/mill/android/kotlin.html[even-more-experimental support for Android]. This includes IDE integrations, tooling integrations (docs, autoformatters, linters, testing frameworks, etc.)