Browse Source

upgrade SDK version to 27 and common lib to 2.12.4

main
Jiangdg 6 years ago
parent
commit
9eba71cd38
  1. 27
      app/build.gradle
  2. 18
      build.gradle
  3. 2
      gradle/wrapper/gradle-wrapper.properties
  4. 29
      libusbcamera/build.gradle

27
app/build.gradle

@ -1,14 +1,13 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
compileSdkVersion 25 compileSdkVersion rootProject.ext.versionCompiler
buildToolsVersion '26.0.2'
defaultConfig { defaultConfig {
applicationId "com.jiangdg.usbcamera" applicationId "com.jiangdg.usbcamera"
minSdkVersion 16 minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion 22 targetSdkVersion rootProject.ext.versionTarget
versionCode 1 versionCode 1
versionName "1.0" versionName rootProject.ext.versionNameString
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
@ -17,16 +16,22 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 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 { dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
}) })
compile 'com.android.support:appcompat-v7:25.3.1' implementation "com.android.support:appcompat-v7:${supportLibVersion}"
testCompile 'junit:junit:4.12' implementation "com.android.support:support-annotations:${supportLibVersion}"
compile project(':libusbcamera') testImplementation 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:8.8.1' implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation project(':libusbcamera')
} }

18
build.gradle

@ -6,7 +6,7 @@ buildscript {
} }
dependencies { dependencies {
// gradle插件版本 // gradle插件版本
classpath 'com.android.tools.build:gradle:3.0.0' classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
} }
} }
@ -24,12 +24,12 @@ task clean(type: Delete) {
} }
ext { ext {
supportLibVersion = '25.3.1' // variable that can be referenced to keep support libs consistent supportLibVersion = '27.1.1' // variable that can be referenced to keep support libs consistent
commonLibVersion= '1.5.20' commonLibVersion= '2.12.4'
//versionBuildTool = '26.0.2' versionCompiler = 27
//versionCompiler = 25 versionTarget = 27
//versionTarget = 22 minSdkVersion = 21
//versionNameString = '1.0.0' versionNameString = '1.0.0'
javaSourceCompatibility = JavaVersion.VERSION_1_7 javaSourceCompatibility = JavaVersion.VERSION_1_8
javaTargetCompatibility = JavaVersion.VERSION_1_7 javaTargetCompatibility = JavaVersion.VERSION_1_8
} }

2
gradle/wrapper/gradle-wrapper.properties

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

29
libusbcamera/build.gradle

@ -3,15 +3,12 @@ apply plugin: 'com.github.dcendents.android-maven'
group='com.github.jiangdongguo' group='com.github.jiangdongguo'
android { android {
compileSdkVersion 25 compileSdkVersion rootProject.ext.versionCompiler
buildToolsVersion '26.0.2'
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion 22 targetSdkVersion rootProject.ext.versionTarget
versionCode 1 versionCode 1
versionName "1.0" versionName rootProject.ext.versionNameString
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
@ -20,17 +17,25 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 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 { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: new File(buildDir, 'libs'), include: '*.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
}) })
compile 'com.android.support:appcompat-v7:25.3.1' testImplementation 'junit:junit:4.12'
testCompile 'junit:junit:4.12' implementation "com.android.support:appcompat-v7:${supportLibVersion}"
compile("com.serenegiant:common:${commonLibVersion}") { 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' exclude module: 'support-v4'
} }
} }

Loading…
Cancel
Save