This repository was archived by the owner on Jul 27, 2023. It is now read-only.
forked from software-mansion/react-native-gesture-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade to gradle 7.1.1 #5
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bc6b2d3
Upgrade Gradle to 7.1.1
oguzkocer 5c6d254
Use plugin DSL
oguzkocer a3727b8
Simplify android extension
oguzkocer 46d73ee
Update repositories & dependencies
oguzkocer 4776e67
Remove settings.gradle
oguzkocer 7cec2af
Update lib/build.gradle
oguzkocer 17727ed
Adds isStandaloneproject extension property and handles react-native …
oguzkocer 9afe9fd
Adds maven-publish plugin
oguzkocer e75fec4
Remove jitpack.yml
oguzkocer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,65 +1,59 @@ | ||
| buildscript { | ||
| repositories { | ||
| google() | ||
| jcenter() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath rootProject.ext.has('gradleBuildTools') ? rootProject.ext.get('gradleBuildTools') : 'com.android.tools.build:gradle:3.3.0' | ||
| classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' | ||
| } | ||
| ext.isStandaloneProject = (project == rootProject) | ||
| } | ||
|
|
||
| apply plugin: 'com.android.library' | ||
| apply plugin: 'com.github.dcendents.android-maven' | ||
|
|
||
| def safeExtGet(prop, fallback) { | ||
| rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
| plugins { | ||
| id "com.android.library" | ||
| id "maven-publish" | ||
| } | ||
|
|
||
| android { | ||
| compileSdkVersion safeExtGet("compileSdkVersion", 28) | ||
| compileSdkVersion 30 | ||
|
|
||
| defaultConfig { | ||
| minSdkVersion safeExtGet('minSdkVersion', 16) | ||
| targetSdkVersion safeExtGet('targetSdkVersion', 28) | ||
| versionCode 1 | ||
| versionName "1.0" | ||
| minSdkVersion 21 | ||
| targetSdkVersion 30 | ||
| } | ||
|
|
||
| // Include "lib/" as sources, unfortunetely react-native link can't handle | ||
| // setting up alternative gradle modules. We still have "lib" defined as a | ||
| // standalone gradle module just to be used in AndroidNativeExample | ||
| sourceSets { | ||
| main.java.srcDirs += 'lib/src/main/java' | ||
| } | ||
|
|
||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| google() | ||
| jcenter() | ||
| maven { url "https://jitpack.io" } | ||
| maven { | ||
| // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
| url "$rootDir/../node_modules/react-native/android" | ||
| } | ||
| if (project == rootProject) { | ||
| maven { | ||
| url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" | ||
| } | ||
| if (isStandaloneProject) { | ||
| maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" } | ||
| } else { | ||
| // When building as a dep, the RN's maven repo is locally in the node_modules folder | ||
| def nodeModulesPath = "${project.buildDir}/../../node_modules/" | ||
| maven { url "${nodeModulesPath}/react-native/android" } | ||
| } | ||
|
|
||
| google() | ||
| jcenter() | ||
| mavenCentral() | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| if (project == rootProject) { | ||
| if (isStandaloneProject) { | ||
| // If this is the root project (e.g. Jitpack), specify a version | ||
| implementation 'com.facebook.react:react-native:0.64.0' | ||
| } else { | ||
| //noinspection GradleDynamicVersion | ||
| api "com.facebook.react:react-native:+" | ||
| } | ||
| } | ||
|
|
||
| afterEvaluate { | ||
| publishing { | ||
| publications { | ||
| release(MavenPublication) { | ||
| from components.release | ||
| groupId = 'com.github.wordpress-mobile' | ||
| artifactId = 'react-native-gesture-handler' | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,18 +1,7 @@ | ||
| # Project-wide Gradle settings. | ||
| org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError | ||
| org.gradle.parallel=true | ||
| org.gradle.configureondemand=true | ||
| org.gradle.caching=true | ||
|
|
||
| # IDE (e.g. Android Studio) users: | ||
| # Gradle settings configured through the IDE *will override* | ||
| # any settings specified in this file. | ||
|
|
||
| # For more details on how to configure your build environment visit | ||
| # http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
|
||
| # Specifies the JVM arguments used for the daemon process. | ||
| # The setting is particularly useful for tweaking memory settings. | ||
| # Default value: -Xmx10248m -XX:MaxPermSize=256m | ||
| org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
|
|
||
| # When configured, Gradle will run in incubating parallel mode. | ||
| # This option should only be used with decoupled projects. More details, visit | ||
| # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
| # org.gradle.parallel=true | ||
| android.useAndroidX=true | ||
| android.enableJetifier=true |
Binary file not shown.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| #Thu Jul 16 11:44:51 CEST 2020 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip |
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,11 @@ | ||
| pluginManagement { | ||
| plugins { | ||
| id("com.android.library") version "4.2.2" | ||
| } | ||
| repositories { | ||
| gradlePluginPortal() | ||
| google() | ||
| } | ||
| } | ||
|
|
||
| include("lib") |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, is there a way to inherit these settings from
android/build.gradle?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a property to the extension, but I think this one needs a little bit of a project structure re-work. I don't think that change would be high impact, so I am leaving it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Thanks for the explanation 😄