Need to include everything in an AAR file and just have no idea with gradle or CMAKE or ANT...?

Hey guys,
I really, REALLY just want to “slap on” an AAR file (it contains all kinds of nonsense for Android or whatever…)

How can we trivially do this in the latest version of VS Tegra?


Hi mshores,

You can override grade configuration in Nsight Tegra to do this.

  1. Set Android Build System to “Gradle” at Project Properties>Configuration Properties>General>Project Defaults>Android Build System.
  2. Set Gradle Build Script Override Path: Project Properties>Gradle Build>Gradle Script Override Path.
  3. Set Enable Gradle Build SCript Override to Yes.
  4. Add your AAR in your Gradle build script like the below:
allprojects {
   repositories {
      flatDir {
        dirs '<your aar lib folder path>'

    dependencies {
       compile(name:'<your arr lib name>', ext:'aar')



Victor, remind me to buy you some of that AMAZING Vodka from Kiev to split with you and Mikhail :)



Hey Victor,
Ok, it looks like I am running into the change that you guys did for version 3.5 and the gradle build system.

If I have an old nsight_tegra_build_overrides.gralde, what is the FULL process for me to get not only THOSE additions into an “autogenerated gradle build file” (<— I don’t know where this is…) and the dependencies, etc.

I keep having to unzip the aar, place the headers manually, link with the .so manually… and then it doesn’t work :(

Let me know!


Hey Victor,
Also, I’m seeing extensive use of this:

LOCAL_SHARED_LIBRARIES := so_lib_that_dlinks_to_other_so_libs

Where is the equivalent in Tegra VS?


Ha ha, sorry to harass you here, Victor. For anyone reading who is a total nube with (OR get anxiety attacks using) gradle… just keep moving your dependencies and tasks into/out of different scopes.


… it works!!

Thanks, Victor!


Hi Matt.

Anxiety aside, you need to prepare a hand-written Gradle build script (as we’ve discussed on multiple ocassions).
The auto-generated script that’s located in a project’s build directory can be your starting point. The VS project properties are exported into a separate Gradle script named nsight_tegra_build_properties.gradle that a developer is expected to reference in a custom script.
Then, extend your custom build script as Victor has suggested.
Hope that helps, and if it’s not, please check the documentation for Android plugin for Gradle:
Note that NT VSE is using the older pre-3.0 version of Android plugin for Gradle.

Hey Mikhail,
How’s the weather over there? Man, you guys must be enjoying the excitement of the World Cup! :)

I know you’ve been hammering me on this, so yes, this is what shall happen from now on, etc. AND, that feature that gives us full control TOTALLY MAKES THIS easy. THANK YOU!


PS - I’ll send an image with me angrily reading Gradle for Dummies ;P

I also recommend the Android developers to get acquainted with sources of Android build plugin for Gradle, that is a part of AOSP. That is quite useful to understand the object model of a build system that’s much more complex than one can imagine by looking at the DSL alone.

Hey Mikhail,
Ha ha, yes, I’ll take my medicine :)