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

18
build.gradle

@ -6,7 +6,7 @@ buildscript {
}
dependencies {
// 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'
}
}
@ -24,12 +24,12 @@ task clean(type: Delete) {
}
ext {
supportLibVersion = '25.3.1' // variable that can be referenced to keep support libs consistent
commonLibVersion= '1.5.20'
//versionBuildTool = '26.0.2'
//versionCompiler = 25
//versionTarget = 22
//versionNameString = '1.0.0'
javaSourceCompatibility = JavaVersion.VERSION_1_7
javaTargetCompatibility = JavaVersion.VERSION_1_7
supportLibVersion = '27.1.1' // variable that can be referenced to keep support libs consistent
commonLibVersion= '2.12.4'
versionCompiler = 27
versionTarget = 27
minSdkVersion = 21
versionNameString = '1.0.0'
javaSourceCompatibility = JavaVersion.VERSION_1_8
javaTargetCompatibility = JavaVersion.VERSION_1_8
}

2
gradle/wrapper/gradle-wrapper.properties

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
compileSdkVersion rootProject.ext.versionCompiler
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.versionTarget
versionCode 1
versionName "1.0"
versionName rootProject.ext.versionNameString
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@ -20,17 +17,25 @@ android {
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 {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
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'
})
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
compile("com.serenegiant:common:${commonLibVersion}") {
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'
}
}

Loading…
Cancel
Save