Skip to content

Commit e56c101

Browse files
author
ihsan BAL
authored
Merge pull request #62 from ihsanbal/release/3.0
Release/3.0
2 parents 5e679d1 + fa63677 commit e56c101

Some content is hidden

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

43 files changed

+1657
-1265
lines changed

app/build.gradle

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android-extensions'
3+
apply plugin: 'kotlin-android'
4+
apply plugin: 'kotlin-kapt'
25

36
android {
4-
compileSdkVersion 27
7+
compileSdkVersion 29
58
//noinspection GradleDependency
6-
buildToolsVersion '27.0.3'
79

810
defaultConfig {
911
applicationId "ihsanbal.com.logginginterceptor"
10-
minSdkVersion 14
11-
//noinspection OldTargetApi
12-
targetSdkVersion 27
12+
minSdkVersion 21
13+
targetSdkVersion 29
1314
versionCode 1
1415
versionName "1.0"
1516
buildConfigField("boolean", "MOCK", "false")
16-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17-
}
18-
19-
signingConfigs {
20-
debug {
21-
storeFile rootProject.file("${System.properties['user.home']}/.android/debug.keystore")
22-
keyAlias 'androiddebugkey'
23-
keyPassword 'android'
24-
storePassword 'android'
25-
}
17+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2618
}
2719

2820
compileOptions {
@@ -40,37 +32,39 @@ android {
4032
buildTypes {
4133
mock {
4234
debuggable true
43-
signingConfig signingConfigs.debug
4435
buildConfigField("boolean", "MOCK", "true")
4536
}
4637
}
47-
38+
sourceSets {
39+
main.java.srcDirs += 'src/main/kotlin'
40+
}
4841
}
4942

5043
dependencies {
51-
implementation 'com.android.support:appcompat-v7:' + rootProject.ext.supportVersion
52-
implementation 'io.reactivex:rxjava:' + rootProject.ext.rxjavaVersion
53-
implementation 'io.reactivex:rxandroid:' + rootProject.ext.rxAndroidVersion
54-
implementation 'com.squareup.retrofit2:retrofit:' + rootProject.ext.retrofitVersion
55-
implementation 'com.squareup.retrofit2:adapter-rxjava:' + rootProject.ext.retrofitRxAdapterVersion
56-
implementation 'com.google.dagger:dagger:' + rootProject.ext.daggerVersion
57-
implementation 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
58-
implementation 'com.squareup.retrofit2:converter-gson:' + rootProject.ext.gsonConverterVersion
59-
implementation 'com.squareup.okhttp3:okhttp:' + rootProject.ext.okhttpVersion
60-
implementation 'com.squareup.okio:okio:1.15.0'
61-
annotationProcessor 'com.google.dagger:dagger-compiler:' + rootProject.ext.daggerVersion
62-
annotationProcessor 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion
63-
debugImplementation 'com.squareup.leakcanary:leakcanary-android:' + rootProject.ext.leakCanaryVersion
64-
releaseApi 'com.squareup.leakcanary:leakcanary-android-no-op:' + rootProject.ext.leakCanaryVersion
65-
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:' + rootProject.ext.leakCanaryVersion
44+
implementation 'androidx.core:core-ktx:1.2.0'
45+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
46+
47+
implementation 'androidx.appcompat:appcompat:1.1.0'
48+
implementation 'io.reactivex:rxjava:' + rxjavaVersion
49+
implementation 'io.reactivex:rxandroid:' + rxAndroidVersion
50+
implementation 'com.squareup.retrofit2:retrofit:' + retrofitVersion
51+
implementation 'com.squareup.retrofit2:adapter-rxjava:' + retrofitRxAdapterVersion
52+
implementation 'com.google.dagger:dagger:' + daggerVersion
53+
implementation 'com.squareup.retrofit2:converter-gson:' + gsonConverterVersion
54+
implementation 'com.squareup.okhttp3:okhttp:' + okhttpVersion
55+
implementation 'com.squareup.okio:okio:' + okioVersion
56+
kapt 'com.google.dagger:dagger-compiler:' + daggerVersion
57+
debugImplementation 'com.squareup.leakcanary:leakcanary-android:' + leakCanaryVersion
58+
releaseApi 'com.squareup.leakcanary:leakcanary-android-no-op:' + leakCanaryVersion
59+
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:' + leakCanaryVersion
6660
compileOnly 'javax.annotation:jsr250-api:1.0'
67-
// implementation(project(':lib')) {
68-
// exclude group: 'org.json', module: 'json'
69-
// }
70-
implementation('com.github.ihsanbal:LoggingInterceptor:3.0.0') {
61+
implementation(project(':lib')) {
7162
exclude group: 'org.json', module: 'json'
7263
}
73-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
74-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
75-
androidTestImplementation 'com.android.support.test:rules:1.0.2'
64+
// implementation('com.github.ihsanbal:LoggingInterceptor:3.0.0') {
65+
// exclude group: 'org.json', module: 'json'
66+
// }
67+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
68+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
69+
androidTestImplementation 'androidx.test:rules:1.2.0'
7670
}

app/src/androidTest/java/ihsanbal/com/logginginterceptor/ui/InterceptorsTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
package ihsanbal.com.logginginterceptor.ui;
22

3-
import android.support.test.espresso.ViewInteraction;
4-
import android.support.test.rule.ActivityTestRule;
5-
import android.support.test.runner.AndroidJUnit4;
3+
import androidx.test.espresso.ViewInteraction;
4+
import androidx.test.rule.ActivityTestRule;
5+
import androidx.test.ext.junit.runners.AndroidJUnit4;
66

77
import org.junit.Rule;
88
import org.junit.Test;
99
import org.junit.runner.RunWith;
1010

1111
import ihsanbal.com.logginginterceptor.R;
1212

13-
import static android.support.test.espresso.Espresso.onView;
14-
import static android.support.test.espresso.action.ViewActions.click;
15-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
16-
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
17-
import static android.support.test.espresso.matcher.ViewMatchers.withId;
18-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
13+
import static androidx.test.espresso.Espresso.onView;
14+
import static androidx.test.espresso.action.ViewActions.click;
15+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
16+
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
17+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
18+
import static androidx.test.espresso.matcher.ViewMatchers.withText;
1919
import static org.hamcrest.Matchers.allOf;
2020

2121
@RunWith(AndroidJUnit4.class)

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
23
package="ihsanbal.com.logginginterceptor">
34

45
<uses-permission android:name="android.permission.INTERNET" />
@@ -11,7 +12,9 @@
1112
android:label="@string/app_name"
1213
android:roundIcon="@mipmap/ic_launcher_round"
1314
android:supportsRtl="true"
14-
android:theme="@style/AppTheme">
15+
android:usesCleartextTraffic="true"
16+
android:theme="@style/AppTheme"
17+
tools:targetApi="m">
1518

1619
<activity android:name=".ui.MainActivity">
1720
<intent-filter>

app/src/main/assets/mock/delete.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"array": [
3+
{
4+
"glossary": {
5+
"title": "example glossary",
6+
"GlossDiv": {
7+
"title": "S",
8+
"GlossList": {
9+
"GlossEntry": {
10+
"ID": "SGML",
11+
"SortAs": "SGML",
12+
"GlossTerm": "Standard Generalized Markup Language",
13+
"Acronym": "SGML",
14+
"Abbrev": "ISO 8879:1986",
15+
"GlossDef": {
16+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
17+
"GlossSeeAlso": [
18+
"GML",
19+
"XML"
20+
]
21+
},
22+
"GlossSee": "markup"
23+
}
24+
}
25+
}
26+
}
27+
},
28+
{
29+
"glossary": {
30+
"title": "example glossary",
31+
"GlossDiv": {
32+
"title": "S",
33+
"GlossList": {
34+
"GlossEntry": {
35+
"ID": "SGML",
36+
"SortAs": "SGML",
37+
"GlossTerm": "Standard Generalized Markup Language",
38+
"Acronym": "SGML",
39+
"Abbrev": "ISO 8879:1986",
40+
"GlossDef": {
41+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
42+
"GlossSeeAlso": [
43+
"GML",
44+
"XML"
45+
]
46+
},
47+
"GlossSee": "markup"
48+
}
49+
}
50+
}
51+
}
52+
},
53+
{
54+
"glossary": {
55+
"title": "example glossary",
56+
"GlossDiv": {
57+
"title": "S",
58+
"GlossList": {
59+
"GlossEntry": {
60+
"ID": "SGML",
61+
"SortAs": "SGML",
62+
"GlossTerm": "Standard Generalized Markup Language",
63+
"Acronym": "SGML",
64+
"Abbrev": "ISO 8879:1986",
65+
"GlossDef": {
66+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
67+
"GlossSeeAlso": [
68+
"GML",
69+
"XML"
70+
]
71+
},
72+
"GlossSee": "markup"
73+
}
74+
}
75+
}
76+
}
77+
}
78+
]
79+
}

app/src/main/assets/mock/file.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"array": [
3+
{
4+
"glossary": {
5+
"title": "example glossary",
6+
"GlossDiv": {
7+
"title": "S",
8+
"GlossList": {
9+
"GlossEntry": {
10+
"ID": "SGML",
11+
"SortAs": "SGML",
12+
"GlossTerm": "Standard Generalized Markup Language",
13+
"Acronym": "SGML",
14+
"Abbrev": "ISO 8879:1986",
15+
"GlossDef": {
16+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
17+
"GlossSeeAlso": [
18+
"GML",
19+
"XML"
20+
]
21+
},
22+
"GlossSee": "markup"
23+
}
24+
}
25+
}
26+
}
27+
},
28+
{
29+
"glossary": {
30+
"title": "example glossary",
31+
"GlossDiv": {
32+
"title": "S",
33+
"GlossList": {
34+
"GlossEntry": {
35+
"ID": "SGML",
36+
"SortAs": "SGML",
37+
"GlossTerm": "Standard Generalized Markup Language",
38+
"Acronym": "SGML",
39+
"Abbrev": "ISO 8879:1986",
40+
"GlossDef": {
41+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
42+
"GlossSeeAlso": [
43+
"GML",
44+
"XML"
45+
]
46+
},
47+
"GlossSee": "markup"
48+
}
49+
}
50+
}
51+
}
52+
},
53+
{
54+
"glossary": {
55+
"title": "example glossary",
56+
"GlossDiv": {
57+
"title": "S",
58+
"GlossList": {
59+
"GlossEntry": {
60+
"ID": "SGML",
61+
"SortAs": "SGML",
62+
"GlossTerm": "Standard Generalized Markup Language",
63+
"Acronym": "SGML",
64+
"Abbrev": "ISO 8879:1986",
65+
"GlossDef": {
66+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
67+
"GlossSeeAlso": [
68+
"GML",
69+
"XML"
70+
]
71+
},
72+
"GlossSee": "markup"
73+
}
74+
}
75+
}
76+
}
77+
}
78+
]
79+
}

app/src/main/assets/mock/patch.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"array": [
3+
{
4+
"glossary": {
5+
"title": "example glossary",
6+
"GlossDiv": {
7+
"title": "S",
8+
"GlossList": {
9+
"GlossEntry": {
10+
"ID": "SGML",
11+
"SortAs": "SGML",
12+
"GlossTerm": "Standard Generalized Markup Language",
13+
"Acronym": "SGML",
14+
"Abbrev": "ISO 8879:1986",
15+
"GlossDef": {
16+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
17+
"GlossSeeAlso": [
18+
"GML",
19+
"XML"
20+
]
21+
},
22+
"GlossSee": "markup"
23+
}
24+
}
25+
}
26+
}
27+
},
28+
{
29+
"glossary": {
30+
"title": "example glossary",
31+
"GlossDiv": {
32+
"title": "S",
33+
"GlossList": {
34+
"GlossEntry": {
35+
"ID": "SGML",
36+
"SortAs": "SGML",
37+
"GlossTerm": "Standard Generalized Markup Language",
38+
"Acronym": "SGML",
39+
"Abbrev": "ISO 8879:1986",
40+
"GlossDef": {
41+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
42+
"GlossSeeAlso": [
43+
"GML",
44+
"XML"
45+
]
46+
},
47+
"GlossSee": "markup"
48+
}
49+
}
50+
}
51+
}
52+
},
53+
{
54+
"glossary": {
55+
"title": "example glossary",
56+
"GlossDiv": {
57+
"title": "S",
58+
"GlossList": {
59+
"GlossEntry": {
60+
"ID": "SGML",
61+
"SortAs": "SGML",
62+
"GlossTerm": "Standard Generalized Markup Language",
63+
"Acronym": "SGML",
64+
"Abbrev": "ISO 8879:1986",
65+
"GlossDef": {
66+
"para": "A meta-markup language, used to create markup languages such as DocBook.",
67+
"GlossSeeAlso": [
68+
"GML",
69+
"XML"
70+
]
71+
},
72+
"GlossSee": "markup"
73+
}
74+
}
75+
}
76+
}
77+
}
78+
]
79+
}

0 commit comments

Comments
 (0)