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

Add support for Gradle 7 [SDK-2964] #429

Merged
merged 4 commits into from
Nov 30, 2021
Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ This SDK attempts to follow [semver](https://semver.org/) in a best-effort basis

| React Native SDK | Auth0 SDK |
| :--------------: | :-------: |
| v0.65.0 | v2.11.0 |
| v0.62.2 | v2.5.0 |
| v0.60.5 | v2.0.0 |
| v0.59.0 or lower | v1.6.0 |
Expand Down
26 changes: 12 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ buildscript {
}
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
// Matches recent template from React Native (0.62)
// https://github.com/facebook/react-native/blob/0.62-stable/template/android/build.gradle#L15
classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '3.5.2')}")
// Matches recent template from React Native (0.67)
// https://github.com/facebook/react-native/blob/0.67-stable/template/android/build.gradle#L16
classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '4.2.2')}")
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'

// Matches values in recent template from React Native 0.62
// https://github.com/facebook/react-native/blob/0.62-stable/template/android/build.gradle#L5-L8
Expand Down Expand Up @@ -96,12 +96,12 @@ afterEvaluate { project ->
}

task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
classifier = 'javadoc'
archiveClassifier = 'javadoc'
from androidJavadoc.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier = 'sources'
from android.sourceSets.main.java.srcDirs
include '**/*.java'
}
Expand All @@ -120,13 +120,11 @@ afterEvaluate { project ->
archives androidJavadocJar
}

task installArchives(type: Upload) {
configuration = configurations.archives
repositories.mavenDeployer {
// Deploy to react-native-event-bridge/maven, ready to publish to npm
repository url: "file://${projectDir}/../android/maven"

configureReactNativePom pom
publishing {
publications {
maven(MavenPublication) {
artifact androidSourcesJar
}
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"readmeFilename": "README.md",
"peerDependencies": {
"react": "^16.11.0 || ^17",
"react-native": ">=0.62.2 <1.0.x"
"react-native": ">=0.65.0 <1.0.x"
},
"devDependencies": {
"@types/jest": "^24.0.18",
Expand All @@ -42,7 +42,7 @@
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"react": "^16.8.6",
"react-native": "^0.62.2",
"react-native": "^0.65.0",
"semver": "^6.3.0"
},
"dependencies": {
Expand Down
Loading