Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #36

Merged
merged 121 commits into from
Feb 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
6b1e937
update change log and prepare for publish version 1.0.3
maoruibin Mar 31, 2016
396864f
use proguard but not use shrinkResources
maoruibin Apr 3, 2016
13af076
prepare for play sound
maoruibin Apr 6, 2016
cab0adf
publish 1.0.3
maoruibin Apr 6, 2016
99444f9
Merge branch 'develop' into dev103
maoruibin Apr 6, 2016
f903585
add play sound fix build gradle error
maoruibin Apr 12, 2016
fe08277
fix build.gradle config error
maoruibin Apr 12, 2016
55d6e3c
Merge branch 'master' into develop
maoruibin Apr 12, 2016
208869d
Merge branch 'develop' into dev103
maoruibin Apr 12, 2016
a559195
update class structure add play sound
maoruibin Apr 16, 2016
ed93873
add feature for open app fast
May 8, 2016
8f70901
update build info
May 28, 2016
512f308
update build.config
May 28, 2016
2852b7f
Merge branch 'dev103' into notifaction
May 28, 2016
805863a
add notifaction suc
May 29, 2016
a31f718
prepare add icon
Jun 11, 2016
0f6a8c0
update gradle version 2.1.2
Jul 7, 2016
acca658
add a property for config sign
Jul 7, 2016
566bd56
add setin
Jul 7, 2016
5d4a4ba
remvoe setting and update string res
Aug 15, 2016
cb2cca8
add ph
Aug 15, 2016
154a027
publish 1.1
Aug 25, 2016
b293bbb
publish 1.1
Aug 25, 2016
f93905c
update settin
Aug 30, 2016
e8afbf3
fix auto show system noti bug and optional pay
Aug 30, 2016
861874f
update verson info
Aug 30, 2016
435eaea
fix beta bug
Aug 30, 2016
3922182
fix show notification always bu
Aug 31, 2016
875c7df
update change log
Aug 31, 2016
fc06dc5
finish 1.2.1 version
Sep 10, 2016
43c5262
add sound for youdao and fix error for baidu
Sep 10, 2016
9d60897
add update version info and changelog
Sep 10, 2016
0c0b1c8
add list for knowledge
Sep 30, 2016
1b2aa15
open recipe word function
Oct 1, 2016
13c6622
update set option
Oct 1, 2016
f800ba0
finish recipe words
Oct 3, 2016
40574f5
修改了 Android N 浮动框点击发音奔溃的 bug
Oct 3, 2016
f1fc814
增加点击动画
Oct 4, 2016
0af8ce7
修正版本号
Oct 4, 2016
2e3acff
为 Android M 设备增加 Text Selection 支持(系统弹框中支持快捷查词)
Oct 5, 2016
022dd6a
添加日志
Oct 6, 2016
85a7256
为悬浮窗增加点击事件
Oct 7, 2016
fc38aab
update version name to 1.3.2
Oct 7, 2016
65b2dd0
add Dayline entitiy
Oct 7, 2016
93c09bf
parse dayline successfully
Oct 7, 2016
acf0321
have a try to use BottomSheetView
Oct 7, 2016
9cffb98
删除无用文件
Oct 8, 2016
b9b41ef
add a pressed effect for pop view
Oct 8, 2016
b52a737
fix display explain repeat
Oct 8, 2016
2017d6a
add dayline
Oct 8, 2016
260b897
add version info to menu
Oct 8, 2016
45c3c78
update version to 1.3.1
Oct 8, 2016
dc4220c
update change log title
Oct 8, 2016
92a16df
add screen listener for lock or unlock to control recipe word
Oct 11, 2016
fdc70bb
add touch listener for PrpcressTextActivity and update procress text
Oct 11, 2016
05bcb30
add setting for control auto play sound
Oct 11, 2016
a4a13a4
add notify for dayline
Oct 11, 2016
7b5855c
fix unregisterReceiver bug
Oct 11, 2016
6093c6a
update change log
Oct 11, 2016
7201a08
remove useless menu item in MainActivity
Oct 12, 2016
4b2412c
remove clear cache
Oct 13, 2016
1b915d0
nothing
Oct 13, 2016
221cd7f
add build gradle
Oct 13, 2016
424da4e
add function to mark word has learn
maoruibin Oct 17, 2016
fb28fd5
add stetho lib
maoruibin Oct 17, 2016
0a7ee75
move Setting icon
maoruibin Oct 17, 2016
5f669a8
fix default value for mark flag
maoruibin Oct 20, 2016
8b7d7d9
fix alarm bug and play sound when open dayline
maoruibin Oct 20, 2016
6ed4ee4
rename packages
Nov 9, 2016
5e8d64f
Merge pull request #28 from cooperkong/develop
maoruibin Nov 10, 2016
e337d7e
fix crash when exit app after launch
Nov 18, 2016
4d44971
Merge pull request #30 from cooperkong/develop
maoruibin Nov 18, 2016
0b9a6a7
add a button for make words
maoruibin Nov 18, 2016
f438edf
Merge branch 'develop' of https://github.com/maoruibin/TranslateApp i…
maoruibin Nov 18, 2016
b9792da
change to srcCompat to older version support
Dec 1, 2016
2fa8cd9
support vector on <21 versions
Dec 1, 2016
8abd0c0
Merge pull request #31 from cooperkong/develop
maoruibin Dec 1, 2016
f6507b9
fix text display in bottom sheet, now showing text at collapsed state
Dec 2, 2016
5ed0b26
Merge pull request #33 from cooperkong/develop
maoruibin Dec 2, 2016
1e1c2ff
nothing
maoruibin Dec 2, 2016
f7c6d1e
Merge branch 'develop' of https://github.com/maoruibin/TranslateApp i…
maoruibin Dec 2, 2016
5ed2b49
warp padding and update layout for dayline
maoruibin Dec 2, 2016
3ddd262
update color
maoruibin Dec 5, 2016
8060012
add crashwoodpecker to track error
maoruibin Dec 5, 2016
77f2b85
revert error
maoruibin Dec 5, 2016
6e349d5
fix conflict
maoruibin Dec 5, 2016
6039597
upgrade retrofit to 2
maoruibin Dec 5, 2016
208fbbf
upgrade library version
maoruibin Dec 5, 2016
ece10f1
nothing
maoruibin Dec 5, 2016
d217da7
fix crash when swipe on error tip view
Dec 6, 2016
1b47f59
Merge pull request #34 from cooperkong/develop
cooperkong Dec 6, 2016
ff96e04
update package name in AndroidMainfest to begin with name
maoruibin Dec 7, 2016
4765780
fix remind for dayline and add setting item for auto paste words
maoruibin Dec 7, 2016
d30f496
Merge branch 'develop' of https://github.com/maoruibin/TranslateApp i…
maoruibin Dec 7, 2016
02730d9
fix multiple procress bug finally thanks to Tray
maoruibin Dec 7, 2016
c3f33e2
fix crash
Dec 12, 2016
a0bcbcc
Merge pull request #1 from cooperkong/develop
cooperkong Dec 12, 2016
de693cd
Merge pull request #35 from cooperkong/maoruibin/develop
maoruibin Dec 13, 2016
bb590cb
fix bu
maoruibin Jan 13, 2017
9bf2462
Merge branch 'float-mark-word' into develop
maoruibin Jan 13, 2017
1a52086
fix:proguard bug and switch translate bug
maoruibin Jan 15, 2017
0eb043b
feat:add fir plugin
maoruibin Jan 25, 2017
ad4ea4b
feat:add over window permission grant
maoruibin Jan 25, 2017
7ff6203
doc:update change log
maoruibin Jan 25, 2017
41709ad
feat:adapter android N
maoruibin Feb 3, 2017
ae26212
Revert "feat:adapter android N"
maoruibin Feb 4, 2017
de2bde4
feat:backup and restore words
maoruibin Feb 4, 2017
ebb5ef7
fix:add lost res
maoruibin Feb 4, 2017
2784126
cfg:add travis
maoruibin Feb 4, 2017
da87b2c
doc:add travis status
maoruibin Feb 4, 2017
94e139b
cfg:add jdk
maoruibin Feb 4, 2017
05266bf
cfg:update cfg for travis
maoruibin Feb 4, 2017
e4eed03
cfg:add script
maoruibin Feb 4, 2017
9ca3609
cfg:add script
maoruibin Feb 4, 2017
665af95
cfg:add script
maoruibin Feb 4, 2017
875f957
cfg:add script
maoruibin Feb 4, 2017
15ab73b
fix:jdk version
maoruibin Feb 4, 2017
d43e042
cfg:use one cfg to control hands
maoruibin Feb 4, 2017
3c35c30
fix:add ch str in beta
maoruibin Feb 4, 2017
a411661
fix:name for text select
maoruibin Feb 11, 2017
7584617
feat:improve word book and fix so many bug
maoruibin Feb 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
sudo: false

language: android
jdk: oraclejdk8

android:
components:

- tools

- build-tools-23.0.2
- android-24
# support lib
- extra-android-m2repository
- extra-android-support

script:
- ./gradlew clean assembleRelease --stacktrace

before_install:
- chmod +x gradlew
19 changes: 19 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

##License

Copyright (C) 2015 GuDong <gudong.name@gmail.com>

This file is part of GdTranslate

GdTranslate is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

GdTranslate is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GdTranslate. If not, see <http://www.gnu.org/licenses/>.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#咕咚翻译
![icon](/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png "")

[![Build Status](https://travis-ci.org/maoruibin/TranslateApp.svg?branch=master)](https://travis-ci.org/maoruibin/TranslateApp)

##介绍
一个实现『划词翻译』功能的 Android 应用 ,可能是目前 Android 市场上翻译效率最高的一款应用。

Expand Down Expand Up @@ -61,6 +63,10 @@ Google+ [咕咚翻译社群](https://plus.google.com/u/1/communities/11191908638

## 更新日志

### V1.3.5

* 增加每日一句

### V1.0.0

* 设计: 首页大改版,使用 MaterialDesign 样式重新设计了首页。Thanks @TonyLOfficial(03-05)
Expand Down
96 changes: 60 additions & 36 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
apply plugin:'im.fir.plugin.gradle'

fir{
apiToken '15e5206706b555384608e449d6def6d3'
changeLog '* add upload plugin for fir\n' +
'* add changelog file'
}

bughd{
projectId '56d30214a1de52062800000e'
apiToken 'e244dc781dd8455c9e6e04b62e1328a0'
}

//格式化打完完成后APK名称中的时间
def releaseTime() {
Expand All @@ -11,6 +23,7 @@ def cfg = rootProject.ext.configuration
def libs = rootProject.ext.libraries;
def test = rootProject.ext.testingLibraries;


android {
compileSdkVersion cfg.compileVersion
buildToolsVersion cfg.buildToolsVersion
Expand All @@ -37,12 +50,14 @@ android {
buildConfigField "String", "YOUDAO_KEY", '"1235023502"'
buildConfigField "String", "YOUDAO_TYPE", '"data"'
buildConfigField "String", "YOUDAO_DOC_TYPE", '"json"'
buildConfigField "String", "YOUDAO_VERSION", '"1.1"'
buildConfigField "String", "YOUDAO_VERSION", '"1.2"'

//common value
buildConfigField "String", "RESULT_JSON", '"json"'
buildConfigField "String", "LANGUAGE_AUTO", '"auto"'
buildConfigField "Boolean", "IS_DEBUG", 'true'

resValue "string", "tray__authority", "${cfg.package}.tray"
}

signingConfigs {
Expand All @@ -51,43 +66,25 @@ android {
}

buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
resValue "string", "tray__authority", "${cfg.package}.debug.tray"
}
release {
//如果签名配置不为空 则设置签名信息
if (signingConfigs.releaseConfig != null) {
signingConfig signingConfigs.releaseConfig
}
//设置是否混淆
minifyEnabled false
//设置压缩对齐
zipAlignEnabled true
//移除无用的资源文件
shrinkResources false
//设置混淆配置文件
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//指定签名包得输入文件名称
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = "GdTranslate_v${defaultConfig.versionName}_${releaseTime()}_${variant.productFlavors[0].name}_release.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}

debug{
if (signingConfigs.releaseConfig != null) {
signingConfig signingConfigs.releaseConfig
}
minifyEnabled true
//设置压缩对齐
zipAlignEnabled true
//移除无用的资源文件
shrinkResources true
//设置是否混淆
minifyEnabled false
//设置混淆配置文件
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//指定签名包得输入文件名称
buildConfigField "Boolean", "IS_DEBUG", 'false'
}
}

Expand All @@ -96,14 +93,14 @@ android {
}

productFlavors {
beta{
manifestPlaceholders = [UMENG_CHANNEL_VALUE:"beta"]
beta {
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "beta"]
}
xiaomi {
manifestPlaceholders = [UMENG_CHANNEL_VALUE:"xiaomi"]
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "xiaomi"]
}
m360 {
manifestPlaceholders = [UMENG_CHANNEL_VALUE:"m360"]
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "m360"]
}
wandoujia {
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "wandoujia"]
Expand All @@ -114,6 +111,13 @@ android {
play {
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "play"]
}
coolapk {
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "coolapk"]
}
dev21 {
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "dev21"]
minSdkVersion cfg.minSdk21
}
}

compileOptions {
Expand All @@ -125,7 +129,7 @@ android {
//set release sign info synchronously
def Properties props = new Properties()
def propFile = file('../gradle.properties')
if (propFile.canRead()) {
if (propFile.exists()) {
props.load(new FileInputStream(propFile))
if (props != null &&
props.containsKey('SIGN_FILE') && props.containsKey('SIGN_KEYSTORE_PASS') &&
Expand All @@ -152,21 +156,41 @@ dependencies {
// Android
compile "com.android.support:recyclerview-v7:${libs.supportVersion}"
compile "com.android.support:appcompat-v7:${libs.supportVersion}"
compile "com.android.support:design:${libs.supportVersion}"

// Google
compile "com.google.dagger:dagger:${libs.dagger}"
apt "com.google.dagger:dagger-compiler:${libs.dagger}"
provided "org.glassfish:javax.annotation:${libs.javax_annotation}"
// Square
compile "com.jakewharton:butterknife:${libs.butterknife}"
compile "com.squareup.retrofit:retrofit:${libs.retrofit}"
compile "com.squareup.retrofit:converter-gson:${libs.retrofit}"
compile "com.squareup.retrofit:adapter-rxjava:${libs.retrofit}"
apt "com.jakewharton:butterknife-compiler:${libs.butterknife}"
compile "com.squareup.retrofit2:retrofit:${libs.retrofit}"
compile "com.squareup.retrofit2:converter-gson:${libs.retrofit}"
compile "com.squareup.retrofit2:adapter-rxjava:${libs.retrofit}"
// Reactive
compile "io.reactivex:rxandroid:${libs.rxandroid}"
// Other
compile "com.orhanobut:logger:${libs.logger}"
compile "com.umeng.analytics:analytics:latest.integration"
retrolambdaConfig "net.orfjackal.retrolambda:retrolambda:${libs.retrolambda}"
compile "com.jonathanfinerty.once:once:${libs.once}"

compile "com.android.support:preference-v7:${libs.supportVersion}"
compile 'com.umeng.analytics:analytics:latest.integration'
compile "com.android.support:support-v4:${libs.supportVersion}"

compile "moe.feng:AlipayZeroSdk:${libs.alipay_zero_sdk}"

compile "com.jenzz:materialpreference:${libs.materialpreference}"
compile "com.github.bumptech.glide:glide:${libs.glide}"

compile ("me.drakeet.library:crashwoodpecker:${libs.crashwoodpecker}"){
exclude module: 'recyclerview-v7'
}
compile project(":headsupcompat")

compile 'net.grandcentrix.tray:tray:0.11.0'

compile 'com.facebook.stetho:stetho:1.4.2'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.2'
}
7 changes: 7 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@

# retrofit
-dontwarn retrofit2.**
-dontwarn retrofit.Platform$Java8
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
Expand Down Expand Up @@ -114,3 +115,9 @@

-keep class me.henrytao.smoothappbarlayout.** { *; }

# http://www.jayfeng.com/2015/12/29/APK%E7%98%A6%E8%BA%AB%E5%AE%9E%E8%B7%B5/
-keepattributes SourceFile,LineNumberTable

-keep class name.gudong.translate.mvp.model.entity.** {*;}


7 changes: 7 additions & 0 deletions app/src/beta/res/menu/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@
android:id="@+id/menu_score"
app:showAsAction="never"
android:title="@string/menu_score"/>

<item
android:id="@+id/menu_setting"
app:showAsAction="never"
android:title="@string/menu_setting"/>


<item
android:id="@+id/menu_about"
app:showAsAction="never"
Expand Down
4 changes: 4 additions & 0 deletions app/src/beta/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">咕咚翻译Beta版</string>
<string name="action_opinion">反馈</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/debug/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">咕咚翻译Debug版</string>
<string name="app_process_text">浮动翻译-Debug</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/debug/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">GuDong Translate-Debug</string>
<string name="app_process_text">TranslateFloat-Debug</string>
</resources>
Loading