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

Kotlin #15

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .idea/caches/build_file_checksums.ser
Binary file not shown.
29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/dictionaries/nanchen.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

31 changes: 10 additions & 21 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AiYaGirl
爱吖妹纸 —— Retrofit + RxJava + MVP 架构 APP 体验,福利多多,不容错过<br>

#### 号外:听说「nanchen」搞了一个 Android 开发者的免费福利,不行你看:[给 Android 开发者的一点福利:免费模拟面试](http://mp.weixin.qq.com/s/WRdSmGxwDp-CpQcSlmJYlg)
### 该版本为 kotlin 版本,kotlin 大法好,作为一名 Android 开发者,赶紧加入 kotlin 开发大军吧~

爱吖妹纸数据来源于代码家的 [干货集中营](http://gank.io/), UI 和部分设计参考自 [云阅](https://github.com/youlookwhat/CloudReader), 那么多完整的 APP, 你选择了我,这是我的幸运。<br>

Expand Down Expand Up @@ -31,6 +31,9 @@
![](https://github.com/nanchen2251/AiYaGirl/blob/master/screenshot/2.jpg)

## 更新日志
V 2.0.1<br>
* [优化] 采用 kotlin 全面改写 APP

V 1.0.6<br>
* [修复] 修复主页在华为手机上虚拟按键也被沉浸式挡住的适配问题。

Expand Down Expand Up @@ -93,7 +96,7 @@ V 1.0.2<br>

## Licenses
```
Copyright 2017 nanchen(刘世麟)
Copyright 2018 nanchen(刘世麟)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
74 changes: 39 additions & 35 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,70 +1,74 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
// buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.nanchen.aiyagirl"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled 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')) {
// 输出apk名称为AiYaGirl_1.0.1.apk
def fileName = "AiYaGirl_${defaultConfig.versionName}.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.13'
// base
compile "com.android.support:design:$supportLibVersion"
compile "com.android.support:cardview-v7:$supportLibVersion"
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'

implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

// network
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

// rx
compile 'com.squareup.retrofit2:adapter-rxjava:2.2.0'
compile 'io.reactivex:rxandroid:1.2.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.9.0'
implementation 'io.reactivex:rxandroid:1.2.1'

// di
compile 'com.jakewharton:butterknife:8.5.1'
// implementation 'com.jakewharton:butterknife:8.5.1'

// ui
compile 'cn.bingoogolapple:bga-swipebacklayout:1.0.8'
compile 'com.github.Andy671:Dachshund-Tab-Layout:v0.3.0'
compile 'com.github.glomadrian:grav:1@aar'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.GrenderG:Toasty:1.1.3'
compile 'com.youth.banner:banner:1.4.9'
compile 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'cn.bingoogolapple:bga-swipebacklayout:1.1.1'
implementation 'com.github.Andy671:Dachshund-Tab-Layout:v0.3.0'
implementation 'com.github.glomadrian:Grav:1.1'
// 'com.github.glomadrian:grav:1@aar'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.GrenderG:Toasty:1.1.3'
implementation 'com.youth.banner:banner:1.4.9'
implementation 'com.github.chrisbanes:PhotoView:2.0.0'

// canary
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
// annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.nanchen.aiyagirl;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Loading