Skip to content
This repository was archived by the owner on Feb 14, 2020. It is now read-only.

Commit 57ee617

Browse files
authored
Merge pull request #36 from Jawnnypoo/master
Updates to Auth
2 parents 523e8d8 + 257eabf commit 57ee617

Some content is hidden

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

52 files changed

+165
-3556
lines changed

.travis.yml

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
branches:
22
only:
3-
- master
3+
- master
4+
45
language: android
5-
sudo: false
6+
67
jdk:
7-
- oraclejdk8
8-
android:
9-
components:
10-
- tools
11-
- platform-tools
12-
- build-tools-25.0.2
13-
- android-25
14-
- doc-25
15-
- extra-android-support
16-
- extra-android-m2repository
8+
- oraclejdk8
9+
1710
before_install:
18-
- pip install --user codecov
11+
- pip install --user codecov
12+
- mkdir "$ANDROID_HOME/licenses" || true
13+
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
14+
1915
script:
20-
- "./gradlew clean testDebugUnitTest jacocoTestReport --info"
16+
- "./gradlew clean testDebugUnitTest jacocoTestReport --info"
17+
2118
after_success:
22-
- "./gradlew coveralls"
23-
- codecov
24-
- "./scripts/publish_snapshot.sh"
19+
- "./gradlew coveralls"
20+
- codecov
21+
- "./scripts/publish_snapshot.sh"
22+
2523
cache:
2624
directories:
2725
- "$HOME/.gradle"
2826
- "$HOME/.m2/repository"
27+
2928
deploy:
3029
provider: script
3130
script: ./gradlew bintrayUpload

CONTRIBUTING.md

-63
This file was deleted.

README.md

+34-28
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,53 @@
11
# Parse Twitter Utils for Android
22
[![Build Status][build-status-svg]][build-status-link]
33
[![Coverage Status][coverage-status-svg]][coverage-status-link]
4-
[![Maven Central][maven-svg]][maven-link]
54
[![License][license-svg]][license-link]
65

7-
A utility library to authenticate `ParseUser`s with Twitter. For more information, see our [guide][guide].
6+
A utility library to authenticate `ParseUser`s with Twitter.
87

9-
## Download
10-
Download [the latest JAR][latest] or define in Gradle:
8+
## Dependency
119

12-
```groovy
13-
dependencies {
14-
compile 'com.parse:parsetwitterutils-android:1.10.6'
15-
}
16-
```
17-
18-
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
19-
20-
## Usage
21-
Everything can done through the supplied gradle wrapper:
10+
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
2211

23-
### Compile a JAR
24-
```
25-
./gradlew clean jarRelease
12+
```gradle
13+
allprojects {
14+
repositories {
15+
...
16+
maven { url "https://jitpack.io" }
17+
}
18+
}
2619
```
27-
Outputs can be found in `Parse/build/libs/`
2820

29-
### Run the Tests
30-
```
31-
./gradlew clean testDebug
21+
Then, add the library to your project `build.gradle`
22+
```gradle
23+
dependencies {
24+
implementation 'com.github.parse-community:ParseTwitterUtils-Android:latest.version.here'
25+
}
3226
```
33-
Results can be found in `Parse/build/reports/`
3427

35-
### Get Code Coverage Reports
28+
## Usage
29+
Extensive docs can be found in the [guide][guide]. The basic steps are:
30+
```java
31+
ParseTwitterUtils.initialize("YOUR CONSUMER KEY", "YOUR CONSUMER SECRET");
3632
```
37-
./gradlew clean jacocoTestReport
33+
Then later, when your user taps the login button:
34+
```java
35+
ParseTwitterUtils.logIn(this, new LogInCallback() {
36+
@Override
37+
public void done(ParseUser user, ParseException err) {
38+
if (user == null) {
39+
Log.d("MyApp", "Uh oh. The user cancelled the Twitter login.");
40+
} else if (user.isNew()) {
41+
Log.d("MyApp", "User signed up and logged in through Twitter!");
42+
} else {
43+
Log.d("MyApp", "User logged in through Twitter!");
44+
}
45+
}
46+
});
3847
```
39-
Results can be found in `Parse/build/reports/`
4048

4149
## How Do I Contribute?
42-
We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines](CONTRIBUTING.md).
50+
We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines](https://github.com/parse-community/Parse-SDK-Android/blob/master/CONTRIBUTING.md).
4351

4452
## License
4553
Copyright (c) 2015-present, Parse, LLC.
@@ -60,7 +68,5 @@ As of April 5, 2017, Parse, LLC has transferred this code to the parse-community
6068
[build-status-link]: https://travis-ci.org/ParsePlatform/ParseTwitterUtils-Android
6169
[coverage-status-svg]: https://coveralls.io/repos/ParsePlatform/ParseTwitterUtils-Android/badge.svg?branch=master&service=github
6270
[coverage-status-link]: https://coveralls.io/github/ParsePlatform/ParseTwitterUtils-Android?branch=master
63-
[maven-svg]: https://maven-badges.herokuapp.com/maven-central/com.parse/parsetwitterutils/badge.svg?style=flat
64-
[maven-link]: https://maven-badges.herokuapp.com/maven-central/com.parse/parsetwitterutils
6571
[license-svg]: https://img.shields.io/badge/license-BSD-lightgrey.svg
6672
[license-link]: https://github.com/ParsePlatform/ParseTwitterUtils-Android/blob/master/LICENSE

build.gradle

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
21
buildscript {
32
repositories {
3+
google()
44
jcenter()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.3.1'
7+
classpath 'com.android.tools.build:gradle:3.1.3'
8+
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
9+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
810
}
911
}
1012

1113
plugins {
12-
id "com.jfrog.bintray" version "1.7.3"
14+
id 'com.github.ben-manes.versions' version '0.20.0'
1315
}
1416

1517
allprojects {
1618
repositories {
19+
google()
1720
jcenter()
1821
}
1922
}
23+
24+
task clean(type: Delete) {
25+
delete rootProject.buildDir
26+
}

gradle/wrapper/gradle-wrapper.properties

+1-1
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-3.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)