Browse Source

TeddeMacBook-Pro.local push @ 2017-08-09_17-17-41

Ted 6 years ago
parent
commit
c5aad092fe
4 changed files with 39 additions and 19 deletions
  1. 9 9
      app/build.gradle
  2. 1 10
      build.gradle
  3. 6 0
      push.sh
  4. 23 0
      version.gradle

+ 9 - 9
app/build.gradle

@@ -1,14 +1,14 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 26
-    buildToolsVersion "26.0.1"
+    compileSdkVersion getProject().compileSdkVersion
+    buildToolsVersion getProject().buildToolsVersion
     defaultConfig {
         applicationId "com.tedxiong.android"
-        minSdkVersion 16
-        targetSdkVersion 26
-        versionCode 1
-        versionName "1.0"
+        minSdkVersion getProject().minSdkVersion
+        targetSdkVersion getProject().targetSdkVersion
+        versionCode getProject().versionCode
+        versionName getProject().versionName
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 
         externalNativeBuild {
@@ -40,8 +40,8 @@ dependencies {
     androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
         exclude group: 'com.android.support', module: 'support-annotations'
     })
-    compile 'com.android.support:appcompat-v7:26.0.0'
-    compile 'com.android.support.constraint:constraint-layout:1.0.2'
-    compile 'com.android.support:design:26.0.0'
+    compile getProject().appcompatV7
+    compile getProject().constraintLayout
+    compile getProject().design
     testCompile 'junit:junit:4.12'
 }

+ 1 - 10
build.gradle

@@ -1,4 +1,5 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply from:'version.gradle'
 
 buildscript {
     repositories {
@@ -12,16 +13,6 @@ buildscript {
     }
 }
 
-allprojects {
-    repositories {
-        jcenter()
-        maven {
-            url "https://maven.google.com"
-        }
-    }
-
-}
-
 task clean(type: Delete) {
     delete rootProject.buildDir
 }

+ 6 - 0
push.sh

@@ -0,0 +1,6 @@
+time=`date "+%Y-%m-%d_%H-%M-%S"`
+who=`hostname`
+git add --all
+git commit -m "${who} push @ ${time}"
+git push origin master
+echo "Finished Push"

+ 23 - 0
version.gradle

@@ -0,0 +1,23 @@
+def androidSupportVersion = '26.0.0'
+def androidConstraintLayout = '1.0.2'
+
+ext{
+    versionCode = 1
+    versionName = "1.0"
+    compileSdkVersion = 26
+    buildToolsVersion = "26.0.1"
+    minSdkVersion = 16
+    targetSdkVersion = 26
+    appcompatV7 = "com.android.support:appcompat-v7:$androidSupportVersion"
+    design = "com.android.support:design:$androidSupportVersion"
+    constraintLayout = "com.android.support.constraint:constraint-layout:$androidConstraintLayout"
+}
+
+allprojects {
+    repositories {
+        jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
+    }
+}