Questions tagged [gradle-experimental]

The new experimental gradle plugin for Android

The new experimental plugin is based on Gradle’s new component model mechanism, while allows significant reduction in configuration time. It also includes NDK integration for building JNI applications.

The user guide provides details on how to use it and highlights the difference between the new plugin and the original plugin.

Note that this is plugin is at the experimental stage. The Gradle API for the new component model is not final, which means it’ll only work with a specific version of Gradle until the APIs are final.

Useful links:

107 questions
13
votes
3 answers

Add productFlavor to experimental Android gradle plugin library

I've got a project that uses the experimental gradle plugin, i.e. 0.2.0. When I've got no productFlavor, I can perfectly integrate a library module in Android Studio and everything works perfectly. But when the library has a productFlavor, I main…
10
votes
2 answers

Android Studio native code compiling is slow

I recently switched from Eclipse+ADT to Android Studio. My app is a full native C++ application. I use Android Studio 2.0 Beta 5 and Gradle Experimental 0.6.0-beta4. The build process of Android Studio is very slow for the native code. I read all…
10
votes
4 answers

Gradle (android experimental plugin) ignores a project dependency

I'm using Gradle Android Experimental plugin in the following project structure: Root Project |-- app |-- my-library settings.gradle include ':my-library', ':app' build.gradle buildscript { repositories { jcenter() } …
Matoe
  • 2,742
  • 6
  • 33
  • 52
9
votes
1 answer

Experimental features in Android extension is good for Production release

I'm using the @Parcelize feature in android development using Kotlin language. To use them I have done the below modifications in build.gradle file. apply plugin: 'kotlin-android-extensions' then androidExtensions { experimental = true } I'm…
9
votes
1 answer

linking against .so files in a .aar file using android gradle experimental

I am using the android gradle experimental plugin to build an app module with some native code. This native code uses a library with pre-built .so files, which I am bundling into a .aar file via an android library module. The .aar file builds fine,…
Jeremy Bell
  • 5,253
  • 5
  • 41
  • 63
9
votes
1 answer

How to specify sourceCompatibility compile options when using the Android Gradle Experimental plugin

I'm currently using the Android Gradle Experimental plugin in one of my apps and I would like to be able to use the retrolambda library. One of the requirements is to specify some compileOptions. In the normal android build plugin, this works: …
hopia
  • 4,880
  • 7
  • 32
  • 54
8
votes
1 answer

How to use extra *.so libraries on Android Studio and NDK

I am trying to generate an Android application to use some extra *.so libraries (specifically 'libinterface.so'). Those libraries are generated externally, and included as a dependency inside a wrapper class called from Java side. The library is…
8
votes
3 answers

How to build an Android Gradle based app with NDK only for the ARM target?

I have a .so file from vendor which only support "arm". Currently it works perfectly fine for my Android application. Somehow I want to separate the implementation using Android Studio module, so I can export the module as Jar following this…
zoom
  • 160
  • 1
  • 1
  • 11
7
votes
3 answers

Mixing android plugins from gradle and gradle-experimental

Is there any way or workarounds or just hints to make plugins from gradle and gradle-experimental working together? For example to mix those two…
froger_mcs
  • 13,972
  • 5
  • 23
  • 34
6
votes
1 answer

How to access versionCode from task in Gradle Experimental Plugin

I would like to access versionCode and versionName in defaultConfig from a gradle task. I am using the experimental gradle plugin. I tried model.android.defaultConfig.versionCode but it doesn't recognise android... apply plugin:…
emKaroly
  • 756
  • 1
  • 10
  • 22
6
votes
1 answer

Android gradle-experimental with databinding not working?

I had some troubles when I tried to use the latest Android building tool(gradle-experimental:0.6.0-alpha3) with databinding framework. It results in an error when I try to refresh all gradle projects. First: Error:Exception thrown while executing…
bitdancer
  • 1,215
  • 2
  • 19
  • 34
6
votes
1 answer

How to build NDK module using gradle experimental plugin?

I'm trying to build project with module which uses NDK. But Gradle build gives error. this is my build.gradle(Main project) buildscript { repositories { jcenter() } dependencies { classpath…
inin
  • 372
  • 1
  • 4
  • 17
6
votes
4 answers

How does one set a C/C++ include path with Gradle Experimental Plugin?

Android Studio cannot find my header files when they are in a location different to the main source folder of my module. This is noticeable by #include "SDL_config.h" statements being highlighted in red (other #include statements are fine). I have…
5
votes
0 answers

Gradle - How to Fail on Major Version Conflict?

If my project requires dependency com.abc:xyz:1.2.0, and I have another dependency that transitively wants com.abc:xyz:2.0.0, this is a major problem because even if my project compiles, there could be behavior differences. For some reason in this…
GreenSaguaro
  • 2,968
  • 2
  • 22
  • 41
5
votes
0 answers

Migrate build to use cmake

I'm migrating a project from gradle-experimental:0.8.3 to gradle:2.3.3 . Along with it I need to also start using the new cmake which is proving to not be so straight forward. A snippet for the experimental gradle plugin that worked: repositories { …
1
2 3 4 5 6 7 8