apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' group='com.github.jiangdongguo' android { compileSdkVersion rootProject.ext.versionCompiler defaultConfig { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.versionTarget versionCode 1 versionName rootProject.ext.versionNameString testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // solving com.android.tools.r8.CompilationFailedException: Compilation failed to complete compileOptions { sourceCompatibility rootProject.ext.javaSourceCompatibility targetCompatibility rootProject.ext.javaTargetCompatibility } } dependencies { implementation fileTree(dir: new File(buildDir, 'libs'), include: '*.jar') androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) testImplementation 'junit:junit:4.12' implementation "com.android.support:appcompat-v7:${supportLibVersion}" implementation "com.android.support:support-annotations:${supportLibVersion}" // when changing compile to implementation // AS will report exception of com.serenegiant.widget.IAspectRatioView api("com.serenegiant:common:${commonLibVersion}") { exclude module: 'support-v4' } }