Skip to content

Commit bf9de97

Browse files
author
luca
committed
bump deps versions, change path name
1 parent 85e73b8 commit bf9de97

33 files changed

+117
-143
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ local.properties
1919
.DS_Store
2020

2121
.externalNativeBuild
22-
/lib/src/main/res/xml/credentials.xml
22+
/auth/src/main/res/xml/credentials.xml
2323
/sampleapp/src/main/res/xml/credentials.xml

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

auth/build.gradle

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-android-extensions'
4+
apply plugin: 'kotlin-kapt'
5+
6+
apply plugin: 'com.github.dcendents.android-maven'
7+
8+
android {
9+
compileSdkVersion 28
10+
buildToolsVersion = '28.0.3'
11+
12+
defaultConfig {
13+
minSdkVersion 19
14+
targetSdkVersion 28
15+
versionCode = 1
16+
versionName = VERSION_NAME
17+
}
18+
19+
sourceSets {
20+
test.java.srcDirs += 'src/test/kotlin'
21+
}
22+
23+
compileOptions {
24+
sourceCompatibility JavaVersion.VERSION_1_8
25+
targetCompatibility JavaVersion.VERSION_1_8
26+
}
27+
28+
kotlinOptions {
29+
jvmTarget = '1.8'
30+
noReflect = true
31+
}
32+
}
33+
34+
androidExtensions {
35+
experimental = true
36+
}
37+
38+
dependencies {
39+
implementation fileTree(dir: 'libs', include: ['*.jar'])
40+
41+
testImplementation "junit:junit:$junit_ver"
42+
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockito_ver"
43+
testImplementation "xyz.nulldev.huandroid:huandroid:$htmlunit_ver"
44+
45+
46+
implementation "androidx.core:core-ktx:$ktx_ver"
47+
48+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_ver"
49+
50+
implementation "com.squareup.retrofit2:retrofit:$retrofit_ver"
51+
implementation "com.squareup.retrofit2:converter-moshi:$retrofit_ver"
52+
53+
implementation "com.squareup.moshi:moshi:$moshi_ver"
54+
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_ver"
55+
}
56+
57+
install {
58+
repositories.mavenInstaller {
59+
60+
pom.project {
61+
62+
packaging 'aar'
63+
groupId GROUP_ID
64+
artifactId ARTIFACT_ID
65+
version VERSION_NAME
66+
67+
name NAME
68+
description = DESCRIPTION
69+
url REPO_URL
70+
71+
licenses {
72+
license {
73+
name 'MIT License'
74+
url 'http://www.opensource.org/licenses/mit-license.php'
75+
}
76+
}
77+
developers {
78+
developer {
79+
id 'KirkBushman'
80+
name 'Luca Pellizzari'
81+
82+
}
83+
}
84+
scm {
85+
connection GIT_URL
86+
developerConnection GIT_URL
87+
url REPO_URL
88+
}
89+
}
90+
}
91+
}
File renamed without changes.
File renamed without changes.

lib/src/main/java/com/kirkbushman/lib/models/TokenBearer.kt renamed to auth/src/main/java/com/kirkbushman/lib/models/TokenBearer.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ class TokenBearer(
6262
return "Authorization: bearer ${getRawAccessToken()}"
6363
}
6464

65+
fun getAuthHeader(): Map<String, String> {
66+
return hashMapOf("Authorization" to "bearer ".plus(getRawAccessToken()))
67+
}
68+
6569
fun revokeToken() {
6670

6771
if (isRevoked) {

build.gradle

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
buildscript {
44

55
ext {
6-
android_gradle_ver = '3.4.0'
6+
android_gradle_ver = '3.4.1'
77

8-
kotlin_ver = '1.3.31'
9-
ktx_ver = '1.0.2'
10-
mdc_ver = '1.1.0-alpha06'
11-
retrofit_ver = '2.5.0'
12-
moshi_ver = '1.8.0'
8+
kotlin_ver = '1.3.31'
9+
ktx_ver = '1.0.2'
10+
mdc_ver = '1.1.0-alpha07'
11+
retrofit_ver = '2.6.0'
12+
moshi_ver = '1.8.0'
1313

14-
junit_ver = '4.12'
15-
mockito_ver = '2.1.0'
16-
htmlunit_ver = '2.30.01'
14+
junit_ver = '4.12'
15+
mockito_ver = '2.1.0'
16+
htmlunit_ver = '2.30.01'
17+
18+
maven_plugin = '2.1'
1719
}
1820

1921
repositories {
@@ -25,8 +27,7 @@ buildscript {
2527
classpath "com.android.tools.build:gradle:$android_gradle_ver"
2628
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_ver"
2729

28-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
29-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
30+
classpath "com.github.dcendents:android-maven-gradle-plugin:$maven_plugin"
3031
}
3132
}
3233

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

22
NAME='com.kirkbushman:android-reddit-oauth2'
3+
PLAIN_NAME='android-reddit-oauth2'
34
DESCRIPTION='This library helps authenticate Reddit API and manage token, while making requests.'
4-
VERSION_NAME=1.0.0
5+
VERSION_NAME=1.0.1
56
GROUP=com.kirkbushman.android_reddit_oauth2
67
GROUP_ID=com.kirkbushman
78
ARTIFACT_ID=android-reddit-oauth2
89
REPO_URL='https://github.com/KirkBushman/Android-Reddit-OAuth2'
910
GIT_URL='https://github.com/KirkBushman/Android-Reddit-OAuth2.git'
11+
ISSUES_URL='https://github.com/KirkBushman/Android-Reddit-OAuth2/issues'
1012

1113
org.gradle.jvmargs=-Xmx2G
1214

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

ktlint.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ configurations {
77
}
88

99
dependencies {
10-
ktlint "com.github.shyiko:ktlint:0.31.0"
10+
ktlint "com.pinterest:ktlint:0.33.0"
1111
// additional 3rd party ruleset(s) can be specified here
1212
// just add them to the classpath (ktlint 'groupId:artifactId:version') and
1313
// ktlint will pick them up
1414
}
1515

1616
task ktlint(type: JavaExec, group: "verification") {
1717
description = "Check Kotlin code style."
18-
main = "com.github.shyiko.ktlint.Main"
18+
main = "com.pinterest.ktlint.Main"
1919
classpath = configurations.ktlint
2020
args "src/**/*.kt"
2121
// to generate report in checkstyle format prepend following args:

lib/build.gradle

Lines changed: 0 additions & 124 deletions
This file was deleted.

sampleapp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333

3434
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_ver"
3535

36-
implementation project(":lib")
36+
implementation project(':auth')
3737

3838
implementation "com.google.android.material:material:$mdc_ver"
3939
implementation "androidx.core:core-ktx:$ktx_ver"

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':lib', ':sampleapp'
1+
include ':auth', ':sampleapp'

0 commit comments

Comments
 (0)