Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
284e3ca2
Commit
284e3ca2
authored
Mar 29, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
fb3732b2
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
917 additions
and
4 deletions
+917
-4
build.gradle
GoodMoney/app/build.gradle
+66
-3
Reader17kSDK-release1.1.3.aar
GoodMoney/app/libs/Reader17kSDK-release1.1.3.aar
+0
-0
filter-lib-release1.1.aar
GoodMoney/app/libs/filter-lib-release1.1.aar
+0
-0
readerlib-release1.1.aar
GoodMoney/app/libs/readerlib-release1.1.aar
+0
-0
proguard-rules.pro
GoodMoney/app/proguard-rules.pro
+111
-1
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+2
-0
ReaderManager.java
.../main/java/com/mints/goodmoney/manager/ReaderManager.java
+119
-0
ToutiaoAD.java
.../src/main/java/com/mints/goodmoney/manager/ToutiaoAD.java
+570
-0
build.gradle
GoodMoney/build.gradle
+49
-0
No files found.
GoodMoney/app/build.gradle
View file @
284e3ca2
...
...
@@ -2,6 +2,12 @@ apply plugin: 'com.android.application'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'dagger.hilt.android.plugin'
apply
plugin:
'androidx.navigation.safeargs.kotlin'
apply
plugin:
'android-aspectjx'
apply
plugin:
'com.sensorsdata.analytics.android'
android
{
compileSdkVersion
rootProject
.
ext
.
androidCompileSdkVersion
buildToolsVersion
rootProject
.
ext
.
androidBuildToolsVersion
...
...
@@ -58,6 +64,19 @@ android {
}
}
kapt
{
arguments
{
arg
(
"AROUTER_MODULE_NAME"
,
project
.
getName
())
}
}
aspectjx
{
exclude
'versions.9'
}
buildFeatures
{
dataBinding
true
}
buildTypes
{
debug
{
...
...
@@ -190,7 +209,7 @@ dependencies {
// 三方接入
// leakcanary
debugImplementation
'com.squareup.leakcanary:leakcanary-android:2.4'
//
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// 极光推送
implementation
'cn.jiguang.sdk:jpush:3.6.6'
implementation
'cn.jiguang.sdk:jcore:2.3.8'
...
...
@@ -280,10 +299,54 @@ dependencies {
implementation
'com.squareup.retrofit2:converter-scalars:2.6.2'
implementation
'com.squareup.retrofit2:converter-gson:2.6.2'
implementation
'com.alibaba:fastjson:1.2.11'
// 激励视频RTA
implementation
(
name:
'taskwake1.0'
,
ext:
'aar'
)
// 听读
implementation
files
(
'libs/Reader17kSDK-release1.1.3.aar'
)
implementation
files
(
'libs/readerlib-release1.1.aar'
)
implementation
files
(
'libs/filter-lib-release1.1.aar'
)
compileOnly
"com.squareup.inject:assisted-inject-annotations-dagger2:$rootProject.assistedInjectVersion"
kapt
"androidx.room:room-compiler:$rootProject.roomVersion"
kapt
"com.github.bumptech.glide:compiler:$rootProject.glideVersion"
kapt
"com.google.dagger:hilt-android-compiler:$rootProject.hiltVersion"
kapt
"androidx.hilt:hilt-compiler:$rootProject.hiltViewModelVersion"
kapt
"com.squareup.inject:assisted-inject-processor-dagger2:$rootProject.assistedInjectVersion"
implementation
"androidx.core:core-ktx:$rootProject.ktxVersion"
implementation
"androidx.fragment:fragment-ktx:$rootProject.fragmentVersion"
implementation
"androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
implementation
"androidx.lifecycle:lifecycle-livedata-ktx:$rootProject.lifecycleVersion"
implementation
"androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycleVersion"
implementation
"androidx.navigation:navigation-fragment-ktx:$rootProject.navigationVersion"
implementation
"androidx.navigation:navigation-ui-ktx:$rootProject.navigationVersion"
implementation
"androidx.paging:paging-runtime:$rootProject.pagingVersion"
implementation
"androidx.room:room-runtime:$rootProject.roomVersion"
implementation
"androidx.room:room-ktx:$rootProject.roomVersion"
implementation
"androidx.viewpager2:viewpager2:$rootProject.viewPagerVersion"
implementation
"androidx.work:work-runtime-ktx:$rootProject.workVersion"
implementation
"com.google.code.gson:gson:$rootProject.gsonVersion"
implementation
"org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutinesVersion"
implementation
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutinesVersion"
implementation
"com.google.dagger:hilt-android:$rootProject.hiltVersion"
implementation
"androidx.hilt:hilt-lifecycle-viewmodel:$rootProject.hiltViewModelVersion"
implementation
"com.scwang.smart:refresh-header-material:$rootProject.refresh_version"
//谷歌刷新头
implementation
'com.github.pdog18:dimension-extensions:1.0'
implementation
'com.github.zhpanvip:BannerViewPager:3.2.0'
api
"androidx.navigation:navigation-fragment-ktx:$navigationVersion"
api
"androidx.navigation:navigation-ui-ktx:$navigationVersion"
api
"androidx.navigation:navigation-dynamic-features-fragment:$navigationVersion"
implementation
'com.github.warkiz.widget:indicatorseekbar:1.2.9'
implementation
'org.greenrobot:eventbus:3.2.0'
implementation
'skin.support:skin-support:4.0.5'
// skin-support
implementation
'skin.support:skin-support-appcompat:4.0.5'
// skin-support 基础控件支持
implementation
'skin.support:skin-support-design:4.0.5'
// skin-support-design material design 控件支持[可选]
implementation
'skin.support:skin-support-cardview:4.0.5'
// skin-support-cardview CardView 控件支持[可选]
implementation
'skin.support:skin-support-constraint-layout:4.0.5'
// skin-support-constraint-layout ConstraintLayout 控件支持[可选]
implementation
"androidx.datastore:datastore-preferences:1.0.0-alpha02"
implementation
'com.github.F1ReKing:StatusLayout:1.2.1'
kapt
"com.alibaba:arouter-compiler:$arouter_compiler_version"
//注意版本号
implementation
"com.alibaba:arouter-api:$arouter_api_version"
implementation
'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
api
'org.aspectj:aspectjrt:1.9.5'
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
GoodMoney/app/libs/Reader17kSDK-release1.1.3.aar
0 → 100755
View file @
284e3ca2
File added
GoodMoney/app/libs/filter-lib-release1.1.aar
0 → 100755
View file @
284e3ca2
File added
GoodMoney/app/libs/readerlib-release1.1.aar
0 → 100755
View file @
284e3ca2
File added
GoodMoney/app/proguard-rules.pro
View file @
284e3ca2
...
...
@@ -667,4 +667,114 @@
*
*[] $VALUES;
public *;
}
# ======================= 蘑菇星球 END ================
\ No newline at end of file
# ======================= 蘑菇星球 END ================
# ===================== 听读 START ================
-keep class com.chineseall.reader17ksdk.
*
*{*;}
-keep class com.chineseall.reader.utils.
*
*{*;}
-keep class com.chineseall.reader.lib.reader.
*
*{*;}
#arouter
-keep public class com.alibaba.android.arouter.routes.
*
*{*;}
-keep public class com.alibaba.android.arouter.facade.
*
*{*;}
-keep class * implements
com.alibaba.android.arouter.facade.template.ISyringe{*;}
# If you use the byType method to obtain Service, add the
-keep interface * implements
com.alibaba.android.arouter.facade.template.IProvider
#百度语音
-keep class com.baidu.tts.
*
*{*;}
-keep class com.baidu.speechsynthesizer.
*
*{*;}
#eventBus
-keepattributes *Annotation*
-keepclassmembers class
*
* {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
-keep class org.greenrobot.eventbug.
*
*{*;}
-keepclassmembers class * extends
org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
#rxjava
-dontwarn rx.
*
*
-keep class rx.
*
* { *; }
#okhttp3
-dontwarn com.squareup.okhttp3.
*
*
-keep class com.squareup.okhttp3.
*
* { *;}
-keep class okhttp3.
*
* { *;}
-keep class okio.
*
* { *;}
-dontwarn sun.security.
*
*
-keep class sun.security.
*
* { *;}
-dontwarn okio.
*
*
-dontwarn okhttp3.
*
*
#retrofit2
-dontwarn retrofit2.
*
*
-keep class retrofit2.
*
* { *; }
-keepattributes Signature
-keepattributes Exceptions
-dontwarn org.robovm.
*
*
-keep class org.robovm.
*
* { *; }
#glide
-keep public class * implements
com.bumptech.glide.module.GlideModule
-keep public enum
com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$
*
* {
*
*[] $VALUES;
public *; }
-keep class com.bumptech.glide.
*
* { *; }
#gson
-keep class com.google.gson.
*
* {*;}
#-keep class com.google.
*
*{*;}
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.
*
* { *; }
-keep class com.google.gson.examples.android.model.
*
* { *; }
-keep class com.google.
*
* {
<fields>;
<methods>; }
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[]
serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-dontwarn com.google.gson.
*
*
#umeng
-dontwarn com.umeng.
*
*
-keep class com.umeng.
*
*{*;}
-keep class u.aly.
*
*{*;}
-keep class com.google.
*
*{*;}
#filter
-keep class com.baiiu.filter.
*
*{*;}
#dragger
-keep class dagger.
*
* { *; }
#statuslayout
-keep class com.f1reking.
*
*{*;}
#dp
-keep class com.pdog.dimension.
*
*{*;}
#seekbar
-keep class com.warkiz.widget.
*
*{*;}
#banner
-keep class com.zhpan.bannerview.
*
*{*;}
-keep class com.zhpan.indicator.
*
*{*;}
#refresh
-keep class com.scwang.smart.refresh.
*
*{*;}
#skin
-keep class skin.support.
*
*{*;}
#神策
-dontwarn com.sensorsdata.analytics.android.sdk.
*
* -keep class com.sensorsdata.analytics.android.sdk.
*
* { *;
}
-dontwarn com.sensorsdata.analytics.android.
*
*
-keep class com.sensorsdata.analytics.android.
*
* {
*;
}
# 使用可视化埋点需添加
-keep class
*
*.R$* {
<fields>; }
# ======================= 听读 END ================
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
284e3ca2
...
...
@@ -41,6 +41,7 @@ import com.ximalaya.ting.android.opensdk.util.BaseUtil;
import
java.util.concurrent.Executors
;
import
dagger.hilt.android.HiltAndroidApp
;
import
rx.Scheduler
;
import
rx.schedulers.Schedulers
;
...
...
@@ -49,6 +50,7 @@ import rx.schedulers.Schedulers;
* 作者:孟崔广
* 时间:2020/10/09 11:40
*/
@HiltAndroidApp
public
class
MintsApplication
extends
MultiDexApplication
{
private
static
MintsApplication
mContext
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ReaderManager.java
0 → 100644
View file @
284e3ca2
package
com
.
mints
.
goodmoney
.
manager
;
import
android.app.Application
;
import
android.app.Dialog
;
import
android.content.DialogInterface
;
import
android.view.View
;
import
androidx.appcompat.app.AlertDialog
;
import
com.chineseall.reader.lib.reader.callbacks.OnAdViewReceiver
;
import
com.chineseall.reader17ksdk.ChineseAllReaderApplication
;
import
com.chineseall.reader17ksdk.callbacks.AdProvider
;
import
com.chineseall.reader17ksdk.callbacks.OnReadCallBack
;
import
com.chineseall.reader17ksdk.utils.ActivityStackManager
;
import
com.chineseall.reader17ksdk.utils.DensityUtil
;
import
com.chineseall.reader17ksdk.utils.NetworkUtil
;
import
com.chineseall.reader17ksdk.utils.ToastUtil
;
import
com.chineseall.reader17ksdk.utils.book.ScreenUtils
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
java.util.Map
;
import
kotlin.Unit
;
import
kotlin.jvm.functions.Function0
;
public
class
ReaderManager
{
public
static
void
init
(
Application
applicationContext
)
{
ChineseAllReaderApplication
.
Companion
.
install
(
applicationContext
,
"1209"
,
"asdf!@"
,
"6"
,
"0"
,
new
AdProvider
()
{
@Override
public
void
onAdDialogPositiveClick
(
@Nullable
Dialog
dialog
,
@NotNull
Function0
<
Unit
>
function0
)
{
if
(
NetworkUtil
.
isNetworkAvailable
(
applicationContext
)
&&
!
NetworkUtil
.
INSTANCE
.
isWifiConnected
(
applicationContext
)
)
{
// 网络可用&&wifi没有连接 kotlin 写法
// AlertDialog.Builder(ActivityStackManager.getInstance().getTopActivity())
// .setTitle("温馨提示")
// .setMessage("当前处于移动网络,播放视频会消耗流量,确定播放?")
// .setPositiveButton("观看视频") { d, _ ->
// d.dismiss()
// ad.showVideo(ActivityStackManager.getInstance().getTopActivity()) {
// block()
// }
// }
// .setNegativeButton("取消") { d, _ ->
// d.dismiss()
// }.create().show()
// return
new
AlertDialog
.
Builder
(
ActivityStackManager
.
getInstance
().
getTopActivity
())
.
setTitle
(
"温馨提示"
)
.
setMessage
(
"当前处于移动网络,播放视频会消耗流量,确定播放?"
)
.
setPositiveButton
(
"观看视频"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
// ad.showVideo(ActivityStackManager.getInstance().getTopActivity(), new ToutiaoAD.OnVideoCloseCallBack() {
// @Override
// public void onClose() {
// function0.invoke();
// }
// });
}
}).
setNegativeButton
(
"取消"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
dialog
.
dismiss
();
}
}).
create
().
show
();
return
;
}
}
@Override
public
void
getReaderScreenAd
(
@NotNull
View
view
,
@NotNull
OnAdViewReceiver
receiver
,
@Nullable
Dialog
dialog
)
{
// ad.loadAD(applicationContext, receiver, 320, 260, new ToutiaoAD.OnClickListener() {
// @Override
// public void onClick() {
// dialog.dismiss();
// }
// });
}
@Override
public
void
getReaderPageAd
(
@NotNull
OnAdViewReceiver
receiver
)
{
// ad.loadAD(applicationContext, receiver, DensityUtil.px2dip(applicationContext, ScreenUtils.getScreenWidth(applicationContext) - DensityUtil.dip2px(applicationContext, 30f)), DensityUtil.px2dip(applicationContext, 854f), null);
}
@Override
public
void
getReaderDialogAd
(
@NotNull
View
view
,
@NotNull
OnAdViewReceiver
receiver
,
@Nullable
Dialog
dialog
)
{
// ad.loadVideoAd(ActivityStackManager.getInstance().getTopActivity(), receiver);
}
});
ChineseAllReaderApplication
.
Companion
.
setOnReadCallBack
(
new
OnReadCallBack
()
{
/**
* "time" : 阅读总时长
* "bookName" : 书名
* "chapterName" : 当前章节名
* "pageInChapter" : 当前章节内阅读页码
* "chapterTotalPages" : 当前章节总页数
*/
@Override
public
void
onReceive
(
@NotNull
Map
<
String
,
?>
map
)
{
Object
time
=
map
.
get
(
"time"
);
ToastUtil
.
toast
(
time
+
""
);
}
},
30
*
1000
);
//间隔30秒 回调一次 间隔任意设置
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ToutiaoAD.java
0 → 100755
View file @
284e3ca2
This diff is collapsed.
Click to expand it.
GoodMoney/build.gradle
View file @
284e3ca2
buildscript
{
ext
.
kotlin_version
=
'1.3.72'
ext
{
// Sdk and tools
compileSdkVersion
=
29
minSdkVersion
=
21
targetSdkVersion
=
29
// App dependencies
appCompatVersion
=
'1.1.0'
assistedInjectVersion
=
'0.5.2'
constraintLayoutVersion
=
'2.0.0-beta3'
coreTestingVersion
=
'2.0.0'
coroutinesVersion
=
"1.3.0-M2"
espressoVersion
=
'3.1.1'
fragmentVersion
=
'1.1.0-alpha09'
glideVersion
=
'4.10.0'
gradleVersion
=
'4.0.1'
gsonVersion
=
'2.8.2'
hiltVersion
=
'2.28.3-alpha'
hiltViewModelVersion
=
'1.0.0-alpha02'
junitVersion
=
'4.12'
kotlinVersion
=
'1.4.10'
ktlintVersion
=
'0.38.1'
ktxVersion
=
'1.0.2'
lifecycleVersion
=
'2.2.0'
materialVersion
=
'1.2.0'
navigationVersion
=
'2.3.1'
okhttpLoggingVersion
=
'4.7.2'
pagingVersion
=
'3.0.0-alpha09'
recyclerViewVersion
=
'1.2.0-alpha04'
retrofitVersion
=
'2.9.0'
roomVersion
=
'2.3.0-alpha01'
runnerVersion
=
'1.0.1'
truthVersion
=
'0.42'
testExtJunit
=
'1.1.0'
uiAutomatorVersion
=
'2.2.0'
viewPagerVersion
=
'1.0.0'
workVersion
=
'2.1.0'
kotlin_version
=
'1.4.10'
arouter_compiler_version
=
'1.5.1'
arouter_api_version
=
'1.5.1'
refresh_version
=
"2.0.1"
}
repositories
{
google
()
jcenter
()
...
...
@@ -18,6 +61,12 @@ buildscript {
dependencies
{
classpath
'com.android.tools.build:gradle:4.0.1'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 听读
classpath
"androidx.navigation:navigation-safe-args-gradle-plugin:2.3.1"
classpath
"com.google.dagger:hilt-android-gradle-plugin:2.28.3-alpha"
classpath
'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10'
classpath
'com.sensorsdata.analytics.android:android-gradle-plugin2:3.3.1'
}
}
...
...
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