Browse Source

添加工具基础库

杨充 4 years ago
parent
commit
00d3de6410
2 changed files with 25 additions and 5 deletions
  1. 18 0
      VideoGradle/video.gradle
  2. 7 5
      VideoView/build.gradle

+ 18 - 0
VideoGradle/video.gradle

@@ -0,0 +1,18 @@
+ext {
+
+    androidBuildToolsVersion = "29.0.0"
+    androidMinSdkVersion = 17
+    androidTargetSdkVersion = 29
+    androidCompileSdkVersion = 29
+
+
+    constraintLayoutVersion = '1.1.3'
+    appcompatVersion = '1.2.0'
+
+    /**主app-start*/
+    AppDependencies = [
+            constraintLayout    : "androidx.constraintlayout:constraintlayout:${constraintLayoutVersion}",
+            appcompat           : "androidx.appcompat:appcompat:${appcompatVersion}",
+    ]
+
+}

+ 7 - 5
VideoView/build.gradle

@@ -1,11 +1,13 @@
 apply plugin: 'com.android.library'
+apply from: rootProject.projectDir.absolutePath + "/VideoGradle/video.gradle"
+
 
 android {
-    compileSdkVersion 29
-    buildToolsVersion '29.0.0'
+    compileSdkVersion project.ext.androidCompileSdkVersion
+    buildToolsVersion project.ext.androidBuildToolsVersion
     defaultConfig {
-        minSdkVersion 17
-        targetSdkVersion 29
+        minSdkVersion project.ext.androidMinSdkVersion
+        targetSdkVersion project.ext.androidTargetSdkVersion
         versionCode 35
         versionName "3.0.5"
     }
@@ -20,7 +22,7 @@ android {
 
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
-    implementation 'androidx.appcompat:appcompat:1.2.0'
+    implementation project.ext.AppDependencies['appcompat']
 }
 
 /** 以下开始是将Android Library上传到jcenter的相关配置**/