author Nick Alexander <nalexander@mozilla.com>
Thu, 22 Feb 2018 16:11:14 -0800
changeset 473898 d8c9882a3b3ca27904d6169567829e79c458e567
parent 450481 ada854f90036f6696691c14d8987822f3f300959
child 474357 b7832a2c2c296390c57c1261d805759530020b26
permissions -rw-r--r--
Bug 1444546 - Part 2: Build annotationProcessors with Gradle. r=jchen 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

  "phabricator.uri" : "https://phabricator.services.mozilla.com/",
  "repository.callsign": "MOZILLACENTRAL"