Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit d06e9a6

Browse files
committed
重构启动页
1 parent 8d5909f commit d06e9a6

File tree

162 files changed

+12471
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+12471
-144
lines changed

.gitignore

-25
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,3 @@ freeline_project_description.json
6161
.idea/caches/
6262
.idea/codeStyles/Project.xml
6363
.idea/runConfigurations.xml
64-
app/.gitignore
65-
app/build.gradle
66-
app/proguard-rules.pro
67-
app/src/
68-
build.gradle
69-
gradle.properties
70-
gradle/
71-
gradlew
72-
gradlew.bat
73-
module-basic/src/main/res/drawable/
74-
module-env/libs/
75-
module-env/src/main/res/drawable/
76-
module-resource/libs/
77-
module-resource/src/main/res/mipmap-hdpi/
78-
module-resource/src/main/res/mipmap-mdpi/
79-
module-resource/src/main/res/mipmap-xhdpi/
80-
module-resource/src/main/res/mipmap-xxhdpi/
81-
module-resource/src/main/res/mipmap-xxxhdpi/
82-
module-sdk/.gitignore
83-
module-sdk/build.gradle
84-
module-sdk/proguard-rules.pro
85-
module-sdk/src/
86-
module-widget/libs/
87-
module-widget/src/main/res/drawable/
88-
settings.gradle

.idea/modules.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

app/build.gradle

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion rootProject.ext.android.compileSdkVersion
5+
6+
defaultConfig {
7+
minSdkVersion rootProject.ext.android.minSdkVersion
8+
targetSdkVersion rootProject.ext.android.targetSdkVersion
9+
applicationId "com.rae.cnblogs"
10+
versionCode 8
11+
versionName "1.1.5"
12+
multiDexEnabled true
13+
ndk {
14+
// 兼容ebView问题
15+
abiFilters "armeabi"
16+
abiFilters "x86"
17+
abiFilters "armeabi-v7a"
18+
}
19+
}
20+
dexOptions {
21+
javaMaxHeapSize "2g"
22+
preDexLibraries = false
23+
}
24+
signingConfigs {
25+
release {
26+
keyAlias 'com.rae.cnblogs'
27+
storeFile file(rootProject.ext.account.storeFile)
28+
keyPassword rootProject.ext.account.keyPassword
29+
storePassword rootProject.ext.account.storePassword
30+
}
31+
}
32+
buildTypes {
33+
debug {
34+
minifyEnabled false
35+
debuggable true
36+
signingConfig signingConfigs.release
37+
}
38+
release {
39+
minifyEnabled false
40+
signingConfig signingConfigs.release
41+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
42+
}
43+
}
44+
}
45+
46+
dependencies {
47+
implementation fileTree(dir: 'libs', include: ['*.jar'])
48+
implementation rootProject.ext.dependencies.appcompat
49+
// 模块化
50+
if (!IsModule.toBoolean()) {
51+
implementation project(':module-resource')
52+
implementation project(':module-env')
53+
implementation project(':module-home')
54+
}
55+
}
File renamed without changes.

app/src/main/AndroidManifest.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.rae.cnblogs">
3+
4+
<application
5+
android:allowBackup="true"
6+
android:label="@string/app_name"
7+
android:supportsRtl="true"
8+
android:theme="@style/AppTheme" />
9+
</manifest>

app/src/main/res/values/colors.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#3F51B5</color>
4+
<color name="colorPrimaryDark">#303F9F</color>
5+
<color name="colorAccent">#FF4081</color>
6+
</resources>

app/src/main/res/values/strings.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">博客园</string>
3+
</resources>

app/src/main/res/values/styles.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
9+
</style>
10+
11+
</resources>

build.gradle

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
// 依赖配置
3+
apply from: 'dependencies.gradle'
4+
apply from: 'properties.gradle'
5+
6+
buildscript {
7+
repositories {
8+
maven { url 'http://maven.raeblog.com:8081/repository/maven-public/' }
9+
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
10+
google()
11+
jcenter()
12+
}
13+
dependencies {
14+
classpath 'com.android.tools.build:gradle:3.1.2'
15+
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
16+
// 热更新插件
17+
// classpath "com.tencent.bugly:tinker-support:1.0.8"
18+
classpath 'com.meituan.android.walle:plugin:1.1.6'
19+
// greenDAO
20+
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
21+
}
22+
}
23+
24+
allprojects {
25+
repositories {
26+
maven { url 'http://maven.raeblog.com:8081/repository/maven-public/' }
27+
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
28+
maven { url "http://mvn.leancloud.cn/nexus/content/repositories/public" }
29+
maven { url "https://jitpack.io" }
30+
jcenter()
31+
google()
32+
}
33+
}
34+
35+
task clean(type: Delete) {
36+
delete rootProject.buildDir
37+
}

dependencies.gradle

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ext {
2626
raeSession : 'com.github.raee:AndroidSessionManager:1.0.0',
2727
okhttpUrlconnection: 'com.squareup.okhttp3:okhttp-urlconnection:3.9.0',
2828
retrofit : 'com.squareup.retrofit2:retrofit:2.3.0',
29-
activeandroid : 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT',
29+
// activeandroid : 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT',
3030
retrofitRxAdapter : 'com.squareup.retrofit2:adapter-rxjava2:2.2.0',
3131
gson : 'com.google.code.gson:gson:2.8.0',
3232
bugly : 'com.tencent.bugly:crashreport_upgrade:1.3.4',
@@ -38,11 +38,18 @@ ext {
3838
recyclerView : 'com.github.raee:XRecyclerView:1.3.3',
3939
roundedImage : 'com.makeramen:roundedimageview:2.3.0',
4040
multidex : 'com.android.support:multidex:1.0.3',
41+
glide : 'com.github.bumptech.glide:glide:4.0.0',
42+
// 友盟统计-公共库
43+
umengCommon : 'com.umeng.sdk:common:1.4.1',
44+
// 友盟统计-APP分析库
45+
umengAnalytics : 'com.umeng.sdk:analytics:7.4.1',
46+
greendao : 'org.greenrobot:greendao:3.2.2',
4147
]
4248

4349
// 注解配置
4450
annotationProcessors = [
4551
butterknife: 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT',
4652
arouter : 'com.alibaba:arouter-compiler:1.1.4',
53+
glide : 'com.github.bumptech.glide:compiler:4.0.0',
4754
]
4855
}

gradle.properties

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx1536m
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. More details, visit
12+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13+
# org.gradle.parallel=true
14+
# 是否启用模块化,当设置为TRUE的时候,所有的模块化将设置成应用程序,单独调试。
15+
IsModule=true

gradle/wrapper/gradle-wrapper.jar

53.4 KB
Binary file not shown.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri May 11 09:11:18 CST 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

gradlew

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#!/usr/bin/env sh
2+
3+
##############################################################################
4+
##
5+
## Gradle start up script for UN*X
6+
##
7+
##############################################################################
8+
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
26+
27+
APP_NAME="Gradle"
28+
APP_BASE_NAME=`basename "$0"`
29+
30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
33+
# Use the maximum available, or set MAX_FD != -1 to use that value.
34+
MAX_FD="maximum"
35+
36+
warn () {
37+
echo "$*"
38+
}
39+
40+
die () {
41+
echo
42+
echo "$*"
43+
echo
44+
exit 1
45+
}
46+
47+
# OS specific support (must be 'true' or 'false').
48+
cygwin=false
49+
msys=false
50+
darwin=false
51+
nonstop=false
52+
case "`uname`" in
53+
CYGWIN* )
54+
cygwin=true
55+
;;
56+
Darwin* )
57+
darwin=true
58+
;;
59+
MINGW* )
60+
msys=true
61+
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
65+
esac
66+
67+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68+
69+
# Determine the Java command to use to start the JVM.
70+
if [ -n "$JAVA_HOME" ] ; then
71+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72+
# IBM's JDK on AIX uses strange locations for the executables
73+
JAVACMD="$JAVA_HOME/jre/sh/java"
74+
else
75+
JAVACMD="$JAVA_HOME/bin/java"
76+
fi
77+
if [ ! -x "$JAVACMD" ] ; then
78+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79+
80+
Please set the JAVA_HOME variable in your environment to match the
81+
location of your Java installation."
82+
fi
83+
else
84+
JAVACMD="java"
85+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86+
87+
Please set the JAVA_HOME variable in your environment to match the
88+
location of your Java installation."
89+
fi
90+
91+
# Increase the maximum file descriptors if we can.
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93+
MAX_FD_LIMIT=`ulimit -H -n`
94+
if [ $? -eq 0 ] ; then
95+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96+
MAX_FD="$MAX_FD_LIMIT"
97+
fi
98+
ulimit -n $MAX_FD
99+
if [ $? -ne 0 ] ; then
100+
warn "Could not set maximum file descriptor limit: $MAX_FD"
101+
fi
102+
else
103+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104+
fi
105+
fi
106+
107+
# For Darwin, add options to specify how the application appears in the dock
108+
if $darwin; then
109+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110+
fi
111+
112+
# For Cygwin, switch paths to Windows format before running java
113+
if $cygwin ; then
114+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116+
JAVACMD=`cygpath --unix "$JAVACMD"`
117+
118+
# We build the pattern for arguments to be converted via cygpath
119+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120+
SEP=""
121+
for dir in $ROOTDIRSRAW ; do
122+
ROOTDIRS="$ROOTDIRS$SEP$dir"
123+
SEP="|"
124+
done
125+
OURCYGPATTERN="(^($ROOTDIRS))"
126+
# Add a user-defined pattern to the cygpath arguments
127+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129+
fi
130+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
131+
i=0
132+
for arg in "$@" ; do
133+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135+
136+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138+
else
139+
eval `echo args$i`="\"$arg\""
140+
fi
141+
i=$((i+1))
142+
done
143+
case $i in
144+
(0) set -- ;;
145+
(1) set -- "$args0" ;;
146+
(2) set -- "$args0" "$args1" ;;
147+
(3) set -- "$args0" "$args1" "$args2" ;;
148+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154+
esac
155+
fi
156+
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
161+
}
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
171+
172+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)