-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Miguel Villaseñor
committed
Jun 1, 2020
1 parent
1f82f3f
commit 3181d61
Showing
14 changed files
with
179 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Publish library | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
publish-library: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Publish to bintray | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER}} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY}} | ||
run: ./gradlew install bintrayUpload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
version = '1.0.0' | ||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
archiveClassifier.set('sources') | ||
} | ||
|
||
task javadoc(type: Javadoc, dependsOn: dokka) { | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier.set('javadoc') | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
Properties properties = new Properties() | ||
def propertiesFile = project.rootProject.file('local.properties') | ||
if (propertiesFile.exists()) { | ||
properties.load(propertiesFile.newDataInputStream()) | ||
} | ||
|
||
// Bintray | ||
bintray { | ||
user = properties.getProperty("bintray.user") ?: System.getenv('BINTRAY_USER') | ||
key = properties.getProperty("bintray.apikey") ?: System.getenv('BINTRAY_API_KEY') | ||
|
||
pkg { | ||
repo = 'maven' | ||
name = 'com.onelogin.oidc' | ||
configurations = ['archives'] | ||
desc = 'OneLogin Android OIDC SDK.' | ||
websiteUrl = 'https://github.com/onelogin/onelogin-oidc-android' | ||
vcsUrl = 'https://github.com/onelogin/onelogin-oidc-android.git' | ||
licenses = ["MIT"] | ||
publish = true | ||
publicDownloadNumbers = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
|
||
group = 'com.onelogin.oidc' | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom { | ||
project { | ||
packaging 'aar' | ||
groupId 'com.onelogin.oidc' | ||
artifactId 'oidc' | ||
name 'OneLogin OIDC SDK' | ||
description 'OneLogin OIDC SDK for android.' | ||
url 'https://github.com/onelogin/onelogin-oidc-android' | ||
|
||
licenses { | ||
license { | ||
name 'The MIT License' | ||
url 'https://opensource.org/licenses/MIT' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'miguelvillasenor' | ||
name 'Miguel Villaseñor' | ||
email 'miguel.villasenor@onelogin.com' | ||
} | ||
} | ||
|
||
scm { | ||
connection 'https://github.com/onelogin/onelogin-oidc-android.git' | ||
developerConnection 'https://github.com/onelogin/onelogin-oidc-android.git' | ||
url 'https://github.com/onelogin/onelogin-oidc-android' | ||
} | ||
} | ||
withXml { | ||
def dependenciesNode = asNode().appendNode('dependencies') | ||
|
||
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each | ||
configurations.implementation.allDependencies.each { | ||
def dependencyNode = dependenciesNode.appendNode('dependency') | ||
dependencyNode.appendNode('groupId', it.group) | ||
dependencyNode.appendNode('artifactId', it.name) | ||
dependencyNode.appendNode('version', it.version) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
oneloginoidc/src/main/java/com/onelogin/oidc/data/AuthorizationServiceProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.onelogin.oidc.data | ||
|
||
import android.content.Context | ||
import net.openid.appauth.AuthorizationService | ||
|
||
object AuthorizationServiceProvider { | ||
|
||
val authorizationService by lazy { | ||
AuthorizationService(context) | ||
} | ||
|
||
private lateinit var context: Context | ||
|
||
fun init(context: Context) { | ||
this.context = context | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters