Age | Commit message (Collapse) | Author |
|
Fixes
https://code.google.com/p/android/issues/detail?id=169743
Change-Id: I1d53af370b17f1720bbf6b2aa2aa8a972235ab61
|
|
own parsers (restored)
(cherry picked from commit 117a087, rev by Vlad)
|
|
Conflicts:
adt-branding/src/idea/AndroidStudioApplicationInfo.xml
android/guiTestSrc/com/android/tools/idea/tests/gui/framework/fixture/ExecutionToolWindowFixture.java
android/resources/messages/AndroidBundle.properties
android/src/META-INF/plugin.xml
android/src/com/android/tools/idea/avdmanager/AvdEditWizard.java
android/src/com/android/tools/idea/avdmanager/AvdWizardConstants.java
android/src/com/android/tools/idea/configurations/LocaleMenuAction.java
android/src/com/android/tools/idea/gradle/project/PostProjectSetupTasksExecutor.java
android/src/com/android/tools/idea/gradle/variant/view/BuildVariantView.java
android/src/com/android/tools/idea/lang/proguard/ProguardFileTypeFactory.java
android/src/com/android/tools/idea/sdk/DefaultSdks.java
android/src/com/android/tools/idea/templates/Template.java
android/src/com/android/tools/idea/wizard/NewAndroidModulePath.java
android/src/org/jetbrains/android/actions/RunAndroidAvdManagerAction.java
android/src/org/jetbrains/android/sdk/AndroidSdkUtils.java
android/testSrc/com/android/tools/idea/welcome/AndroidVirtualDeviceTest.java
Change-Id: I9825f81c2fe13f44c3f4571c33c1a2eb29703f18
|
|
Change-Id: I77361803843a1156cda3d3616819fda33ab77dcc
|
|
Change-Id: I798acd181c89d7bb76d9f075f183040a3cebfc68
|
|
Allows rewriting of AAPT error messages in the Gradle plugin.
Moved from android-common to sdk-common.
Change-Id: I0aa722232cb1b80c40256c0266177cb8bfe867cd
|
|
|
|
https://android.googlesource.com/platform/tools/adt/idea into android-tmp
Conflicts:
adt-branding/src/idea/AndroidStudioApplicationInfo.xml
android-gradle-jps/src/com/android/tools/idea/jps/builder/AndroidGradleTargetBuilder.java
android/android.iml
android/common/testSrc/com/android/tools/idea/gradle/output/parser/BuildOutputParserTest.java
android/src/META-INF/plugin.xml
android/src/com/android/tools/idea/configurations/ConfigurationAction.java
android/src/com/android/tools/idea/ddms/screenshot/DeviceArtPainter.java
android/src/com/android/tools/idea/gradle/invoker/GradleOutputForwarder.java
android/src/com/android/tools/idea/gradle/invoker/GradleTasksExecutor.java
android/src/com/android/tools/idea/gradle/projectView/AndroidTreeStructureProvider.java
android/src/com/android/tools/idea/startup/AndroidStudioSpecificInitializer.java
android/src/com/android/tools/idea/wizard/ImportWizardModuleBuilder.java
android/src/org/jetbrains/android/AndroidPlugin.java
android/src/org/jetbrains/android/exportSignedPackage/GradleSignStep.java
android/src/org/jetbrains/android/facet/AndroidRootUtil.java
android/src/org/jetbrains/android/facet/IdeaSourceProvider.java
android/src/org/jetbrains/android/maven/AndroidFacetImporterBase.java
android/src/org/jetbrains/android/run/AndroidDebugRunner.java
android/testSrc/com/android/tools/idea/gradle/stubs/gradle/GradleProjectStub.java
android/ultimate/src/org/jetbrains/android/database/AndroidDataSource.java
android/ultimate/src/org/jetbrains/android/database/AndroidDataSourcePropertiesDialog.java
|
|
own parsers
|
|
The bug is about the IDE invoking "assemble" Gradle
task for modules that are of "local AAR" type. This
type of module do not have the "assemble" task and
when building the project the IDE should just skip
them.
This bug was already fixed in the GradleInvoker
strategy (in-process build) in
https://android-review.googlesource.com/103541
but it was not fixed in the JPS build (out-of-process
build.)
The solution to the problem is to carefully
add the "Java" facet only to the non-Android modules
that have the "compileJava" task. Then we would only
build the modules with either the Android or Java
facet. The main problem with this solution is that
we need a "Java facet" counterpart in the JPS world.
When dealing with JPS each facet needs to have 2
copies: one for the IDE and one for JPS.
The need for the facets is to be able to figure out
which Gradle tasks to call. We were doing this on
both GradleInvoker and JPS, duplicating the logic on
both sides.
This CL introduces a better solution: all the Gradle
tasks to invoke are figured out in one place: the IDE.
Then the IDE will pass the list of tasks to JPS via
Java properties. This way, we have only one place
where this logic lives, and we can remove a lot of
duplicated code in the JPS side.
Finally fixes issue
https://code.google.com/p/android/issues/detail?id=73640
Change-Id: Ib22de9b654ca975f9ce66bcf80899ce2936b9a37
|
|
This issue appears when the output parsers do not recognize the
output of stderr (this is the case when the error comes from
Gradle itself, and not a 3rd-party tool like javac.) The fix is
to create an error message from stderr, which contains the
cause of the failure.
This CL also updates UI test MultipleModuleTypeCompilationTest
to reproduce the issue and verify that is properly fixed. In addition,
IdeFrameFixture now guarantees that GradleInvoker (in-process
Gradle builds) is always enabled.
Change-Id: Iafbf4105e236e7f42f0f1df8a8f464824ac28131
|
|
Conflicts:
android-gradle-jps/src/com/android/tools/idea/jps/builder/AndroidGradleTargetBuilder.java
android/testSrc/com/android/tools/idea/gradle/stubs/gradle/GradleProjectStub.java
Change-Id: I16f8afda0a821424af8335278a92fcc7ad0c520b
|
|
|
|
https://android.googlesource.com/platform/tools/adt/idea
|
|
|
|
|
|
This CL depends on:
https://android-review.googlesource.com/97066
Change-Id: I01e7f5733488580391b8bfd37bf4960356145340
|
|
This way we ensure we don't create new Gradle daemons.
This CL depends on:
https://android-review.googlesource.com/97034
https://android-review.googlesource.com/97043
Change-Id: Ifd6595c185260c814b2a07713219395e33eb2447
|
|
plug-in.
In this CL, we invoke Gradle passing the JVM arg
"android.invoked.from.ide". The Android Gradle plug-in,
when detecting this argument, will format any
warning/error messages using the pattern:
message_type|gradle_project_path|message
As part of this CL, we parse this output, create
the appropriate message for the "Messages" window
and link to the build.gradle file in the module
with a matching Gradle path.
This CL also fixes broken tests in BuildOutputParserTest.
Change-Id: I2912467ef5dfcb2f5b7923d3c5290feda5613595
|
|
By default IDEA gives Gradle daemons 1 minute to stay idle,
when the default is 3 hours. This setting causes Gradle to
create daemons pretty often, which has a lot of overhead.
The way IDEA sets the timeout is through a system property.
In this CL we override set the corresponding system
property to -1, so IDEA won't change the default value.
This system property only affects project sync. We were
setting the same default (1 minute) in project builds
(both JPS and GradleInvoker.) This CL fixes the daemon
timeout for project builds as well.
Change-Id: Ibf82655f8e053489dbf29d00c1532cfe06de56a1
|
|
- Usage of Gradle incubating features is shown as warning.
- Usage of Gradle deprecated features is shown as warning.
- Build time is shown as info.
- Build status (e.g. SUCCESSFUL) is shown as info.
- Status message changed from "Gradle invocation completed
successfully" to "Gradle build finished" (original
message was confusing when having errors and warnings.)
This CL also refactors/cleans up code a bit.
Change-Id: I53516c252d6ecccf75749477c59dfe077aeab11f
|
|
|
|
This option tells Gradle to configure only the sub-projects
(or modules, in IDEA lingo) that are going to be built, instead
of all the sub-projects in a given project. The result is
faster builds for multi-project projects.
Gradle docs:
http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand
This CL adds a new option in the Compiler > Gradle preference
page to allow users to enable/disable this option (it is
"enabled" by default.)
Change-Id: Ia6ccb72a653b0c96e8fca191d9058023b10a62cf
|
|
Fixes:
https://code.google.com/p/android/issues/detail?id=67679
Change-Id: Iffafc77d08b7140894cfef2717ae2f61da8185aa
|
|
'buildSrc' is a special folder in Gradle that gets
compiled automatically. When an Android project has
this folder, the IDEA android plug-in is not
configuring the module corresponding to this folder
because the Gradle infrastructure in IDEA does not
let us know about the other modules in the project.
Until we have the chances we need in IDEA to decide
whether 'buildSrc' is part of an Android project,
we assume it is if the IDE is Android Studio. This
is a short-term workaround.
Also, this CL adds a change where we skip building
this folder explicitly, because it is handled
automatically by Gradle.
Change-Id: I91d15d1458dda3b85404613827604d8537917094
|
|
Per conversation with Xav and Xiaomei, this CL:
- Adds a new build mode, ASSEMBLE_TRANSLATE, that
ultimately invokes Gradle task "assembleTranslate"
- Passes the JVM arg "enableTranslation" to the
Android Gradle plug-in
Change-Id: Ib92b5e7d7b6cad299e6926005f35776db5d80275
|
|
Before this action only cleaned the project, which pretty much was just
deleting the "build" folder, and since a lot of the IDE functionality
depends on generated sources, cleaning the project left the IDE in
inconsistent state.
Change-Id: I7766b8f446d4c73e607232ea0ee944d5a7e53ff4
|
|
Fixes
https://code.google.com/p/android/issues/detail?id=65615
Change-Id: Ic2889a68d41fdd4f683da7a2233251c6a409a34e
|
|
This CL does the following, when building (make) a
project with failed Gradle sync:
- Call "assemble" since there is no model, we don't
have any information about available tasks
- If the build had 0 errors, we automatically trigger
an import (hoping that since there were no
errors, sync will be successful)
Change-Id: I1fd6c91e0895c25804e224a8beea36f52165d1ba
|
|
With this CL, users will be able to specify
command-line options when building Android-Gradle
projects (e.g. --stacktrace.)
Command-line options can be set in the
preference page "Compiler" > "Gradle".
The page also contains a hyperlink to Gradle's
command-line option documentation.
Change-Id: I02026e9978307a5315988baad6529d61c3a40632
|
|
We currently have a set of tasks that we execute
after each build:
- Notify user that unresolved dependencies were
detected in offline mode, and suggest to go
online
- Refresh Studio's view of the file system (to
see generated files)
- Remove any build-related data stored in the
project itself (e.g. modules to build, current
"build mode" like generate source, make, etc.)
- Notify projects that source generation is
finished.
The problem is that we have calls to these tasks
in 2 separate places:
1. AndroidGradleProjectComponent: when using
JPS builders
2. GradleInvoker and GradleTaskExecutor: when
invoking Gradle directly
This CL unifies the place where these post-build
tasks are invoked, making code maintenance easier.
Change-Id: I9b0ee3894722e83f8576d3bde48f3763fc85990a
|
|
This CL adds 'offline' build mode to both
'direct Gradle invocation' and JPS builders.
Partial fix for
https://code.google.com/p/android/issues/detail?id=58151
We still need to add support for 'offline' project sync
(affects 'New Project', 'Import Project' and 'Sync with
Gradle files' actions.) This change needs to happen in
the IDEA's 'External System Import' framework. I'll work
on that part shortly.
Change-Id: I7b1e77ddcdf2ef362add502bb40d7ed8359dca8d
|
|
This CL adds a task to compile a Java module's test classes
when compilation is invoked in the context of a JUnit run
configuration.
Fixes: https://code.google.com/p/android/issues/detail?id=60916
Change-Id: Ic56606109837287bbf0fa1d2b711598463512e2a
|
|
1. Unparsed output is no longer displayed in the "Messages"
window, since all the Gradle output is displayed in the
Gradle Console.
2. Fixed the column position in compiler errors.
3. Gradle Console now displays the Gradle tasks that will
be executed.
4. "Messages" window now has the message "See complete
output in console" and when users double-click it, it
will activate the Gradle Console.
Change-Id: I7fbd2debbe6022be73ca32926b5a0fc3e9a282a0
|
|
Conflicts:
android-gradle-jps/src/com/android/tools/idea/jps/AndroidGradleJps.java
android/src/com/android/tools/idea/gradle/project/AndroidGradleProjectComponent.java
android/src/com/android/tools/idea/gradle/project/AndroidGradleProjectResolver.java
Change-Id: I0da1fde0e1fcae971d9c994eaadc5eea35baeb2c
|
|
This action appears in the "Build" action
group.
Change-Id: Idba89c03c36dfc02155e6f76bf1a4f11fa6233a8
|
|
(By "building" we mean "making" and "compiling.")
Currently, Android Studio builds all the modules
in the project. Users have reported that they
only want to build certain modules. This CL
enables that.
The main issue with JPS is that it is impossible
to have a 'target builder' (in JPS terminology)
that knows about all the selected modules in
the IDE (JPS has no notion of an IDE.) The
most that we can get from JPS is to have one
'target builder' per module, and these target
builders won't know about each other, making
it impossible to have a single call to Gradle
passing the tasks to execute per selected
module (we would end with a call to Gradle
per module.)
To work around this, we have a back door: we
have an extension point in JPS where we can pass
JVM args to the JPS process (we requested that
some time ago.) In this CL we pass the names
of the selected modules (if any) to as JVM
parameters to the JPS process.
On the other hand, it is really easy to implement
building selected modules in the new build
strategy.
In addition, this CL:
- Fixes the "update" mechanism of the "Make
Module(s)" and "Compile Module(s)".
- Makes it possible to compile a module
if any of its files is selected.
- Unifies the way Gradle tasks to execute
are calculated (for both JPS and
direct Gradle invocation,) fixing bugs
in both build approaches.
- Does not call "assemble" on pure Java
libraries when generating sources.
- Cleans up code.
- Adds more tests.
Fixes
https://code.google.com/p/android/issues/detail?id=59915
Change-Id: I4f24fbfd4773d37c0276ee7b6815d85f6b312fa0
|
|
These classes no longer depend on JPS APIs.
Change-Id: I9de51046bfda9db194e5d9835e71bfe54e983ddb
|
|
|
|
android-gradle module in the project
|
|
In version 0.6.2 of the Gradle plugin, we now emit more regular exceptions
for things like XML errors and AAPT name validation errors. This changeset
adds a suitable error parser, as well as unit tests.
Change-Id: I57c44236663b770f186fffe156248da742633647
|
|
Change-Id: I720248b6889c5d4b129cee7dca54a62b452d472a
|
|
- Importing a project (new or existing) now only performs a single
call to Gradle (by default, IDEA's call Gradle twice: the first
time as a "preview" mode and the second time for resolving
dependencies in the background.) We do everything in the first
pass ("preview" mode) and return and empty project on the second.
- Importing or opening an existing project only calls the Gradle
tasks to clean and generate sources, instead of compiling code.
- Importing a project that has unresolved dependencies won't trigger
a build anymore.
Change-Id: I01d15ef744b9a6013d11175075c3d3d1d578449c
|
|
HTTP proxy settings are already being set for importing
projects.
It is necessary to keep system properties between the process
that imports a project and the one that builds a project. This
way they can use only one Gradle daemon. If system properties
differ, Gradle will start a new daemon, which uses a
significant amount of energy.
Change-Id: I33894575c306c028cc4c4ab9edaf61519bf627a7
|
|
When this error happens, add an error message which explains that you
may just want to try another build.
Change-Id: I6491a44816fc707546a758e14e883358eccdd0ce
|
|
In https://android-review.googlesource.com/#/c/67120/ the error
message format was changed a bit; this tweaks the error parser
to handle both types of formats (and adds a unit test.)
Change-Id: Id92580784342ff9febc38cf01ee91b122872ce95
|
|
Regression text for issue 59824.
Change-Id: I05b93021f8b5a2132291bd0ea649450e8830cb7b
|
|
Change-Id: I2647e958172def028f2052a4f43061256199d69f
|
|
If there are cyclic dependencies in the layouts, detect this during
rendering and emit a suitable warning message (displaying the dependency
chain) and stop rendering. Before this, you'd just (eventually) get a
StackOverflowException with no further details.
Also use the new file<->URL conversion utilities in SdkUtils.
Change-Id: I0f11dac9d8501e478a809af2338de15cde470f2c
|
|
This changeset makes the error parser (which handles embedded path references
pointing to the pre-merge sources of XML files) handle file URLs that contain
escaped characters, such as %2D for dashes -- which is necessary when paths
contain double dashes, since those are not valid in XML comments.
(There is a corresponding fix in the merge writer used by the android plugin
which ensures that paths are escaped when necessary.)
Change-Id: I53d7af26ed1dacf96cf9018edfa5729b7b21f605
|