Skip to content

Commit

Permalink
Move android docs and examples to their own section (#3969)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Nov 15, 2024
1 parent ae19168 commit 9e7f130
Show file tree
Hide file tree
Showing 26 changed files with 21 additions and 13 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@ 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'"
install-android-sdk: false

- 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'
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand All @@ -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[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= (Experimental) Android Builds
= Android Java Projects
:page-aliases: android_app_examples.adoc

include::partial$gtag-config.adoc[]
Expand All @@ -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,
Expand Down Expand Up @@ -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`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= (Experimental) Android Builds
= Android Kotlin Projects
:page-aliases: android_app_kotlin_examples.adoc

include::partial$gtag-config.adoc[]
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/comparisons/gradle.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/comparisons/unique.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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].

Expand Down
7 changes: 5 additions & 2 deletions example/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

Expand Down

0 comments on commit 9e7f130

Please sign in to comment.