Commit Graph

12 Commits

Author SHA1 Message Date
Nick Alexander
c893fc2223 No bug - Make project-wide default language level be Java 1.7 in IntelliJ. r=me
DONTBUILD NPOTB

Straight from http://stackoverflow.com/a/24751182 and the linked
IntelliJ tickets.
2015-08-21 16:16:16 -07:00
Nick Alexander
31ffcc818d Bug 1196970 - Part 2: Make all Android Gradle projects generateCodeAndResoures. r=me
It's convenient to know that the object directory is up-to-date (after
|make gradle-targets|) before any Gradle project builds.
2015-08-20 15:10:06 -07:00
Nick Alexander
7ebc0ca509 Bug 1171566 - Part 1: Configure Gradle and Spoon. rs=mcomella
There are few things happening here:

* A purely mechanical move of test sources into org.mozilla.test.browser.junit3.
  This is only to make it easy to specify the suite in Spoon.  (But it has the
  advantage of making it possible to move files around in IntelliJ, since the
  symlink points to src instead of org/mozilla/gecko.)

* Specifying the suite (package name) ended up requiring changes to the
  spoon-gradle-plugin anyway.  Hence, I've included this custom
  spoon-gradle-plugin version locally, while I work to upstream the changes.

* Some Gradle trickery to make |mach gradle runBrowserTests| execute Spoon with
  the correct package name.
2015-06-04 12:09:23 -07:00
Nick Alexander
67fffb5b16 No bug - Don't let Gradle incrementally dex. r=me
DONTBUILD NPOTB

Unfortunately, Gradle just can't handle incremental dexing in our
multi-project and parallel configuration.  I see the dreaded
"com.android.dex.DexException: Multiple dex files define ..." error
frequently.

I'm using a downloaded Robotium package instead of the in-tree JAR
file as well, 'cuz it seems to be related.
2015-05-24 19:51:22 -07:00
Nick Alexander
02d91e29fb Bug 1160357 - Share generateCodeAndResources across Gradle projects. r=me
This is just a clean-up: rather than having each subproject have a
generateCodeAndResources build action, we have a single action
(attached to the root project) which all subprojects depend on.
Gradle orders the task DAG accordingly, saving process invocations and
speeding up the build.
2015-03-31 17:46:48 -07:00
Nick Alexander
6bbb0995c2 Bug 1125330 - Expose |mach| output after failures invoking from Gradle. r=me,f=ally
--HG--
extra : rebase_source : 8d801f739f77640a587231404e22506f52342438
2015-01-27 21:41:14 -08:00
Nick Alexander
c5aeeb43e2 Bug 1120032 - Use Android-Gradle plugin version 1.0.0 everywhere. r=me
DONTBUILD NPOTB

There are significant problems with the combination of Android-Gradle
0.14.4, Gradle 2.2.1, and IntelliJ 14.0.2.  The problems include
imports that have no recognized source directories and a quasi-working
debugger that fails to stop on breakpoints.

Rather than claim some support for this configuration, we'll move the
Android-Gradle plugin version forward.  This should support both
IntelliJ 14.0.3 (sadly still Early Access Preview only) and Android
Studio 1.0.0.

--HG--
extra : rebase_source : f2394bd65549cef3a2dafb1f83c8d405f0d00124
2015-01-14 11:11:00 -08:00
Nick Alexander
c856aa5856 Bug 1115064 - Fix small errors and make Gradle integration work in Android Studio 1.0.2. r=me
The important change here is that we allow the Android-Gradle plugin
to be version 0.14.4 or version 1.0.0, which appears to work in
IntelliJ 14.0.2 and in Android Studio 1.0.2.

Testing feedback came from imjalpreet and garvank.

--HG--
extra : rebase_source : 2b93dd91603666f1c6a1d2fe0fa7721d5741bdda
2014-12-23 11:39:15 -08:00
Nick Alexander
ab32551e6c Bug 1098239 - Rewrite mobile/android Gradle integration. r=me
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
2014-12-22 19:49:04 -08:00
Nick Alexander
f78a4a8dd6 Backed out changeset 19fdbc7ad829 (bug 1098239)
--HG--
extra : rebase_source : e932299bc61e56e811e0187ddc65ab8b62b7a32b
2014-11-14 13:14:36 -08:00
Lucas Rocha
3bc5048ff4 Bug 1098239 - Use latest gradle and android plugin (r=nalexander) 2014-11-13 15:35:45 -08:00
Nick Alexander
d5a0a90008 Bug 1041395 - Add gradle configuration. r=gps
--HG--
rename : mobile/android/base/docs/index.rst => mobile/android/base/docs/uitelemetry.rst
2014-11-10 13:47:30 -08:00