Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
7e513ea3
Commit
7e513ea3
authored
Jul 07, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bugly
parent
1470e3e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
app_build.gradle
+9
-1
build.gradle
+2
-1
src/main/java/com/common/base/BaseApplication.java
+5
-3
No files found.
app_build.gradle
View file @
7e513ea3
...
@@ -25,10 +25,18 @@ android {
...
@@ -25,10 +25,18 @@ android {
disable
'GoogleAppIndexingWarning'
disable
'GoogleAppIndexingWarning'
}
}
productFlavors
{
website
{
dependencies
{
implementation
'com.tencent.bugly:crashreport:3.0.0'
}
dimension
"channel"
}
}
}
}
dependencies
{
dependencies
{
if
(
"${tongdun_parent_key}"
.
size
()
>
5
)
{
if
(
"${tongdun_parent_key}"
.
size
()
>
5
)
{
implementation
(
name:
'android_spirit-20190220-2.0.0.1'
,
ext:
'aar'
)
implementation
(
name:
'android_spirit-20190220-2.0.0.1'
,
ext:
'aar'
)
}
}
...
...
build.gradle
View file @
7e513ea3
...
@@ -50,12 +50,13 @@ dependencies {
...
@@ -50,12 +50,13 @@ dependencies {
testImplementation
'junit:junit:4.12'
testImplementation
'junit:junit:4.12'
// multidex
// multidex
api
'com.android.support:multidex:1.0.3'
api
'com.android.support:multidex:1.0.3'
api
'com.android.support:multidex-instrumentation:1.0.3'
// 字符串资源替换
// 字符串资源替换
implementation
'com.jcminarro:Philology:1.0.1'
implementation
'com.jcminarro:Philology:1.0.1'
implementation
'io.github.inflationx:viewpump:1.0.0'
implementation
'io.github.inflationx:viewpump:1.0.0'
compileOnly
'com.tencent.bugly:crashreport:3.0.0'
//support包
//support包
//noinspection GradleCompatible
//noinspection GradleCompatible
api
"com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
api
"com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
...
...
src/main/java/com/common/base/BaseApplication.java
View file @
7e513ea3
...
@@ -4,6 +4,7 @@ import android.app.Activity;
...
@@ -4,6 +4,7 @@ import android.app.Activity;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.multidex.MultiDex
;
import
android.support.multidex.MultiDexApplication
;
import
android.support.multidex.MultiDexApplication
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.Gravity
;
import
android.view.Gravity
;
...
@@ -17,6 +18,7 @@ import com.jcminarro.philology.Philology;
...
@@ -17,6 +18,7 @@ import com.jcminarro.philology.Philology;
import
com.jcminarro.philology.PhilologyInterceptor
;
import
com.jcminarro.philology.PhilologyInterceptor
;
import
com.jcminarro.philology.PhilologyRepository
;
import
com.jcminarro.philology.PhilologyRepository
;
import
com.jcminarro.philology.PhilologyRepositoryFactory
;
import
com.jcminarro.philology.PhilologyRepositoryFactory
;
import
com.tencent.bugly.crashreport.CrashReport
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.annotations.Nullable
;
...
@@ -37,6 +39,7 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -37,6 +39,7 @@ public abstract class BaseApplication extends MultiDexApplication {
protected
void
attachBaseContext
(
Context
base
)
{
protected
void
attachBaseContext
(
Context
base
)
{
initLibCnofig
();
initLibCnofig
();
super
.
attachBaseContext
(
AppLanguageUtils
.
attachBaseContext
(
base
,
LibConfig
.
LANGUAGE
));
super
.
attachBaseContext
(
AppLanguageUtils
.
attachBaseContext
(
base
,
LibConfig
.
LANGUAGE
));
MultiDex
.
install
(
this
);
}
}
...
@@ -50,6 +53,8 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -50,6 +53,8 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override
@Override
public
void
onCreate
()
{
public
void
onCreate
()
{
super
.
onCreate
();
super
.
onCreate
();
CrashReport
.
initCrashReport
(
getApplicationContext
(),
"f35508ee93"
,
true
);
AppLanguageUtils
.
setLanguage
(
this
,
LibConfig
.
LANGUAGE
);
AppLanguageUtils
.
setLanguage
(
this
,
LibConfig
.
LANGUAGE
);
PhilologyRepositoryFactory
repositoryFactory
=
locale
->
new
DefaultPhilologyRepository
();
PhilologyRepositoryFactory
repositoryFactory
=
locale
->
new
DefaultPhilologyRepository
();
...
@@ -75,9 +80,6 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -75,9 +80,6 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override
@Override
public
CharSequence
getText
(
@NotNull
String
key
)
{
public
CharSequence
getText
(
@NotNull
String
key
)
{
try
{
try
{
if
(
"text_loan_amount"
.
equals
(
key
)){
Log
.
d
(
"DefaultPhilology"
,
key
);
}
int
resId
=
getResources
().
getIdentifier
(
key
,
"string"
,
LibConfig
.
APPLICATION_ID
);
int
resId
=
getResources
().
getIdentifier
(
key
,
"string"
,
LibConfig
.
APPLICATION_ID
);
return
StringDecrypt
.
uncodeString
(
getResources
().
getString
(
resId
));
return
StringDecrypt
.
uncodeString
(
getResources
().
getString
(
resId
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment