Rename the generated package
[rtmpclient.git] / app / build.gradle
index 74329b6..c265a5a 100644 (file)
@@ -6,9 +6,12 @@ android {
         applicationId "ai.suanzi.rtmpclient"
         minSdkVersion 17
         targetSdkVersion 17
-        versionCode 1
-        versionName "1.0"
+        versionCode 33
+        versionName "v0.3.3"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+        buildConfigField "String", "GIT_REVISION", "\"${getGitVersion()}\""
+        buildConfigField "String", "COMPANY", "\"suanzi.ai\""
+
 
         sourceSets.main {
             jni.srcDirs = []
@@ -16,19 +19,47 @@ android {
         }
 
     }
+    signingConfigs {
+        release {
+            storeFile file("../keystore/rtmpclient.jks")
+            storePassword '123456'
+            keyAlias 'rtmpclient'
+            keyPassword '123456'
+        }
+    }
     buildTypes {
         release {
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+            signingConfig signingConfigs.release
+        }
+        debug {
+            signingConfig signingConfigs.release
         }
     }
+
+    applicationVariants.all { variant ->
+        variant.outputs.all {
+            outputFileName = "RtmpClient-${variant.versionName}-${variant.name}.apk"
+        }
+    }
+}
+
+def getGitVersion() {
+    return 'git rev-parse --short HEAD'.execute().text.trim()
 }
 
 dependencies {
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
     implementation 'com.android.support:appcompat-v7:27.1.1'
     implementation 'com.android.support.constraint:constraint-layout:1.1.0'
     testImplementation 'junit:junit:4.12'
     androidTestImplementation 'com.android.support.test:runner:1.0.1'
     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
+    implementation files('libs/log4j-1.2.17.jar')
+    implementation files('libs/android-logging-log4j-1.0.3.jar')
+    implementation files('libs/android-mail-1.5.5.jar')
+    implementation files('libs/android-activation-1.5.5.jar')
+    implementation 'com.android.support:design:27.1.1'
+    implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
 }