I saw mentioned in another post that from the newest versions of Unity you can define your own gradle file.
I need this in order to include support libraries and compat libraries.
I created a file called dfwvr.gradle in the Plugins/Android directory but it doesn’t seem to help.
Renaming it to build.gradle made no difference.
I took the basic one from the one supplied.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:24.2.1"
compile "com.android.support:support-v4:24.2.1"
**DEPS**}
android {
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
defaultConfig {
targetSdkVersion **TARGETSDKVERSION**
}
lintOptions {
abortOnError false
}
**SIGN**
buildTypes {
debug {
jniDebuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
**SIGNCONFIG**
}
}
}
I followed what it says here but it doesn’t work: Use Android plugin with android support library dependency with gradle builds in Unity 5.5 - Questions & Answers - Unity Discussions