mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 11:45:37 +00:00
520b63c85e
We want annotationProcessors to be compiled and archived into a JAR at build time, ready to generate JNI wrappers. (That is, until we turn the whole thing into a real annotation processor.) But even if we do use a real annotation processor, we still need to generate SDK bindings, which is less clearly expressed as an annotation processor. (It's more of a build step.) Gradle provides a huge number of ways to organize build logic to achieve this: see https://docs.gradle.org/current/userguide/organizing_build_logic.html. Unfortunately, the best such way -- putting the code into $topsrcdir/buildSrc -- has key disadvantages: 1) it pollutes the top-level $topsrcdir, and there's no way to change the location of buildSrc (https://github.com/gradle/gradle/issues/2472); 2) it's complicated to have a dependent project (mobile/android/annotations) expose its code via a buildSrc project; 3) using buildSrc at all appears to conflict with the Android-Gradle plugin version that we are using. Therefore, this commit does something much simpler: it adds a Java-only project and uses the resulting Gradle "Jar" task and archive output as input to the existing Gradle "generate JNI wrappers" task. MozReview-Commit-ID: 2OyYLPneE1M --HG-- extra : rebase_source : d99b74a0a1e0bb3e8f4d4540978328388e5c2e42
12 lines
302 B
Groovy
12 lines
302 B
Groovy
buildDir "${topobjdir}/gradle/build/mobile/android/annotations"
|
|
|
|
apply plugin: 'java'
|
|
|
|
dependencies {
|
|
compile 'com.android.tools.lint:lint:25.3.1'
|
|
compile 'com.android.tools.lint:lint-checks:25.3.1'
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|