Sam J
Sam J

Reputation: 55

Android gradle: How do I get the merged resources directory in the build.gradle script?

The code in question looks like

applicationVariants.all{ variant ->
   if(variant.buildType.name == 'test'){
      println 'path res: ' + //need directory path here
   }
}

Upvotes: 1

Views: 714

Answers (1)

Sam J
Sam J

Reputation: 55

variant.mergeResourcesProvider.get().outputDir.get()

seems to return the path I needed. Likewise for mergeAssetsProvider

Upvotes: 2

Related Questions