Browse Source

配置文件完成

liuyuqi-dellpc 6 years ago
parent
commit
8154a5b51c

+ 11 - 0
app/build.gradle

@@ -10,6 +10,14 @@ android {
         versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
+    signingConfigs {
+        releaseConfig {
+            storeFile file("../monkeytong.jks")
+            storePassword project.hasProperty("KEYSTORE_PASS") ? KEYSTORE_PASS : System.getenv("KEYSTORE_PASS")
+            keyAlias project.hasProperty("ALIAS_NAME") ? ALIAS_NAME : System.getenv("ALIAS_NAME")
+            keyPassword project.hasProperty("ALIAS_PASS") ? ALIAS_PASS : System.getenv("ALIAS_PASS")
+        }
+    }
     buildTypes {
         release {
             minifyEnabled false
@@ -19,6 +27,9 @@ android {
 }
 
 dependencies {
+    compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
+    compile 'com.tencent.bugly:nativecrashreport:latest.release'
+
     implementation fileTree(dir: 'libs', include: ['*.jar'])
     implementation 'com.android.support:appcompat-v7:26.1.0'
     implementation 'com.android.support.constraint:constraint-layout:1.0.2'

+ 3 - 0
app/proguard-rules.pro

@@ -19,3 +19,6 @@
 # If you keep the line number information, uncomment this to
 # hide the original source file name.
 #-renamesourcefileattribute SourceFile
+-dontwarn com.tencent.bugly.**
+-keep public class com.tencent.bugly.**{*;}
+-keep class android.support.**{*;}

+ 4 - 3
app/src/main/AndroidManifest.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="me.yoqi.app.wxredpacket" >
+    package="me.yoqi.app.wxredpacket">
 
     <application
         android:allowBackup="true"
@@ -8,14 +8,15 @@
         android:label="@string/app_name"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/AppTheme" >
-        <activity android:name=".MainActivity" >
+        android:theme="@style/AppTheme">
+        <activity android:name=".activities.MainActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <activity android:name=".activities.SettingsActivity"></activity>
     </application>
 
 </manifest>

+ 3 - 1
app/src/main/java/me/yoqi/app/wxredpacket/MainActivity.java → app/src/main/java/me/yoqi/app/wxredpacket/activities/MainActivity.java

@@ -1,8 +1,10 @@
-package me.yoqi.app.wxredpacket;
+package me.yoqi.app.wxredpacket.activities;
 
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
 
+import me.yoqi.app.wxredpacket.R;
+
 public class MainActivity extends AppCompatActivity {
 
     @Override

+ 15 - 0
app/src/main/java/me/yoqi/app/wxredpacket/activities/SettingsActivity.java

@@ -0,0 +1,15 @@
+package me.yoqi.app.wxredpacket.activities;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+
+import me.yoqi.app.wxredpacket.R;
+
+public class SettingsActivity extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_settings);
+    }
+}

+ 1 - 1
app/src/main/res/layout/activity_main.xml

@@ -5,7 +5,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context="me.yoqi.app.wxredpacket.MainActivity">
+    tools:context="me.yoqi.app.wxredpacket.activities.MainActivity">
 
     <TextView
         android:layout_width="wrap_content"

+ 9 - 0
app/src/main/res/layout/activity_settings.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="me.yoqi.app.wxredpacket.activities.SettingsActivity">
+
+</android.support.constraint.ConstraintLayout>

+ 1 - 0
gradle.properties

@@ -15,3 +15,4 @@ org.gradle.jvmargs=-Xmx1024m
 # This option should only be used with decoupled projects. More details, visit
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
 # org.gradle.parallel=true
+android.useDeprecatedNdk=true