Run checkstyle via:
./mach gradle app:checkstyle
This is intended to be added to automation in bug 1258787 and made more robust
in bug 1261486.
For the addition of future checks, it's worth noting Google's config is
available:
3e4367941c/src/main/resources/google_checks.xml
And this version contains links with descriptions of each of the tasks:
http://checkstyle.sourceforge.net/google_style.html
MozReview-Commit-ID: 5HvtQsyY2JQ
--HG--
extra : rebase_source : ea45bcfb88ec302e9f6e6526d9afdbf2c9c93f01
This is just a simple XML Pull Parser that can read arbitrary ATOM and RSS feeds and returns an
object describing the feed and the latest entry. It's goal is to be small and simple rather than
a full-featured feed parser library.
MozReview-Commit-ID: LIa9neYSfCF
--HG--
rename : mobile/android/app/src/main/resources/robolectric.properties => mobile/android/tests/background/junit4/resources/robolectric.properties
extra : rebase_source : 121fe20ce889092c00fc00ea43e69262724c1290
This is a version produced locally from
1d07987217.
I used |./gradlew install| and then copied the pieces out of ~/.m2/repository.
Local builders should never download using this plugin, since |mach configure|
ensures that all the relevant pieces can already be found. It's just useful in
automation; and as an eventual replacement for chunks of |mach bootstrap|.
MozReview-Commit-ID: 9JiFe0xLr99
--HG--
extra : rebase_source : 5bbe5ada7fce0d3e8a702a09da7ff70fd639dc67
extra : histedit_source : aa7049abefafd652b0db2bd03ab15310967e0ad0
Looking at [1], we halt_on_failure for the `postflight_build_mach_command`s and
the flag I flipped causes the lint command to return a non-zero exit code (i.e.
noting failure).
[1]: https://hg.mozilla.org/mozilla-central/rev/b7f1dac8306f#l2.29
MozReview-Commit-ID: 8v4am9zxxCk
--HG--
extra : rebase_source : 27236e557629ada3931b05d68fad3405cfcc0b5a
DONTBUILD NPOTB
Android Studio (and IntelliJ) does not correctly handle &entity;
definitions in Android strings.xml files. Strings with entities (in
Fennec, all of them) are rendered in the IDE as blank. This patch
expands the entities when copying for use by Gradle, improving the IDE
integration.
MozReview-Commit-ID: 2T6CzoKc7v8
--HG--
extra : rebase_source : 75b2c9e20392d03b8077d2c313538c5fccc9cb34
extra : amend_source : 5b409cc858e08e5be2eef2ded1bc907f2d088e2d
extra : histedit_source : f702d4eb831af75f6374718efaffcf95f974731c
DONTBUILD NPOTB
Using the real Android manifest tripped up Robolectric, so I've taken
the easy way out and added a dummy TestGeckoApplication; see comment
in the code.
MozReview-Commit-ID: 4fCY504UgPu
--HG--
rename : mobile/android/app/base/lint.xml => mobile/android/app/lint.xml
rename : mobile/android/tests/background/junit4/resources/robolectric.properties => mobile/android/app/src/main/resources/robolectric.properties
extra : rebase_source : 689e879dd4ec4402d5e7f948fa5f8be256284a88
extra : intermediate-source : 746468f5d9798ff404a80cd957664e2b69a0e97c
extra : source : a7f63b3721cd3ba105990bbb37a87044383d26d9
extra : histedit_source : 6bdcfa36ddb45bbfd518c5459e4940e29a30f1c2%2C4bfef3b752a85174f1aa1f2226a286ac30bae25a
DONTBUILD NPOTB
Using the real Android manifest tripped up Robolectric, so I've taken
the easy way out and added a dummy TestGeckoApplication; see comment
in the code.
--HG--
rename : mobile/android/app/base/lint.xml => mobile/android/app/lint.xml
rename : mobile/android/tests/background/junit4/resources/robolectric.properties => mobile/android/app/src/main/resources/robolectric.properties
extra : commitid : 2aEbQRv0D7m
extra : rebase_source : c0f014e3fba7008967f8f9782125f940fcc89fe6
extra : amend_source : 46bfdfb116c026da490750a23a9c9188ab4cdf9a
extra : source : a7f63b3721cd3ba105990bbb37a87044383d26d9
DONTBUILD NPOTB
Using the real Android manifest tripped up Robolectric, so I've taken
the easy way out and added a dummy TestGeckoApplication; see comment
in the code.
--HG--
rename : mobile/android/app/base/lint.xml => mobile/android/app/lint.xml
rename : mobile/android/tests/background/junit4/resources/robolectric.properties => mobile/android/app/src/main/resources/robolectric.properties
extra : commitid : BSiXkLh5kSh
extra : rebase_source : ee178b04cd727e11a65f0550d88f1cd951cc5b7a
extra : amend_source : 45f49104a4687cf4cb71391c3f3ac2def8ef716a
This simply packs the assets/ subdirectory of the distribution
directory into the assets/ directory of the Android APK using existing
mechanisms. It also removes the older method of manually pushing
files into dist/bin/distribution, from where they would be packaged
into the APK under distribution/.
--HG--
extra : commitid : BLgM6ZCm9AY
extra : rebase_source : a0896616f79f5a961476e4d2df9745516c58b44a
extra : source : e228040a044b7ff7363a178da2cb0b8b42724048
extra : histedit_source : 0b8f087bc6d70fa42401f4a2476898139bdf606c
This simply packs the assets/ subdirectory of the distribution
directory into the assets/ directory of the Android APK using existing
mechanisms. It also removes the older method of manually pushing
files into dist/bin/distribution, from where they would be packaged
into the APK under distribution/.
--HG--
extra : commitid : BLgM6ZCm9AY
extra : rebase_source : 572d1ff35a02505f452fee67130b48c8df4499b5
extra : histedit_source : 0b8f087bc6d70fa42401f4a2476898139bdf606c
DONTBUILD NPOTB
This is a convenience, and a look ahead to a Gradle-based future. The
reason to do this is that front-end builds don't (really) support
testing, so we set --disable-tests. However, this means that
mobile/android/tests/browser/robocop doesn't get processed at build
time, and that means the Robocop manifest doesn't get preprocessed.
Rather than hack generating the Robocop manifest in, let's skate to
where the puck is going and just use Gradle where appropriate.
--HG--
extra : commitid : 5nV4JtPFbAL
extra : rebase_source : 80bc4b3e316ba9bbac568145594ad90c61758d9e
The default configuration is now localDebug for API 21+, and
localOldDebug for <API 21. This actually paves the way nicely for
automation builds; previously, I was intending to use debug and
release to for local and automation builds, respectively, but this is
more clear.
--HG--
extra : commitid : 9oZw1JaejG7
extra : rebase_source : 9793dbabbc7cd9ff63ba8c957e5ac200f6bd0d38
I moved the JAR out of the root directory because I didn't want
multiple copies of things in robocop/ appearing in IntelliJ, although
this turns out to not be strictly necessary. Keeping it as part of a
general push to move things out of the root dumping ground.
--HG--
rename : mobile/android/tests/browser/robocop/robotium-solo-4.3.1.jar => mobile/android/tests/browser/robocop/libs/robotium-solo-4.3.1.jar
extra : commitid : 6NYW1zNU7k8
extra : rebase_source : e152435da39612fdb69749936c713313f2a5b006
extra : histedit_source : aca11a9101156670d49fe89a9237031e4089f2b8
DONTBUILD NPOTB
The :omnijar project is for IntelliJ only; adding it neatly labels
folders we consider part of the omnijar in mobile/android. The JAR
produced is not used.
We add an evaluation-time dependency from :app to :omnijar so that we
can declare the set of omnijar folders exactly once. We'd prefer to
have the dependency in the other direction (to save evaluation time)
but there's an interface mismatch between the two Gradle model types.
See comments in the :omnijar project.
This is delicate.
--HG--
extra : commitid : 4TLicjMC7Bn
extra : rebase_source : 5dd4ab1e1fcdb296b46bc892b9e10414baadee61
This is a big patch, but it's essentially NPOTB. The part that is POTB
is ... removing Gradle integration from the build. I've implemented
|mach gradle-install| as a substitute for the build system stuff; it's
just so much easier to iterate on a mach command than a moz.build and
Makefile.in.
I'm landing this with self-review because this lessens the impact of the
Gradle integration on the build system and because I am the only person
who understands either the old or the new system.
You'll need to run |mach gradle-install| at top level to configure the
new Gradle integration. But |mach gradle ...| does the right thing
configuration steps too.
This patch rewrites most of the Gradle integration. The major changes
are:
* all .gradle files move into mobile/android/gradle;
* all the Gradle projects live in the object directory;
* mozconfig exposed to all build.gradle files;
* simplification of Android configuration between build.gradle files;
* support for user-specified version of build tools;
* first steps towards supporting builds from the source directory;
* bumps Gradle to 2.2.1;
* bumps the Android-Gradle plugin to 0.14.4.
This is seemingly a step backwards given that we'd prefer to ship the
.idea directory in the source directory. But in fact we get closer to
that; it's possible to run ./gradlew in the source directory and get a
reasonable build. We'll progress with this in time. The win right now
is that the projects are nested, which makes importing work better on
Linux machines.
Unfortunately IntelliJ 13 and 14 now have conflicting Android-Gradle
plugin version requirements, so we now only support IntelliJ 14.0.2 and
above.
--HG--
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/base/AndroidManifest.xml
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/branding/AndroidManifest.xml
rename : mobile/android/gradle/omnijar/gradle_AndroidManifest.xml => mobile/android/gradle/omnijar/AndroidManifest.xml
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/preprocessed_code/AndroidManifest.xml
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/preprocessed_resources/AndroidManifest.xml
rename : mobile/android/thirdparty/gradle_AndroidManifest.xml => mobile/android/gradle/thirdparty/AndroidManifest.xml