Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Upgrade to gradle 7.1.1 #3

Merged
merged 6 commits into from
Aug 16, 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
59 changes: 26 additions & 33 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,51 +1,32 @@
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
plugins {
id "com.android.library"
id "maven-publish"
}

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath rootProject.ext.has('gradleBuildTools') ? rootProject.ext.get('gradleBuildTools') : 'com.android.tools.build:gradle:3.5.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
compileSdkVersion 30

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
minSdkVersion 21
targetSdkVersion 30
}
lintOptions {
abortOnError false
}
}

repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Android JSC is installed from npm
url "$rootDir/../node_modules/jsc-android/dist"
if (project == rootProject) {
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()
maven {
url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror"
}
}

dependencies {
Expand All @@ -57,3 +38,15 @@ dependencies {
api "com.facebook.react:react-native:+"
}
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.wordpress-mobile'
artifactId = 'react-native-linear-gradient'
}
}
}
}
7 changes: 7 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 9 additions & 0 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pluginManagement {
plugins {
id("com.android.library") version "4.2.2"
}
repositories {
gradlePluginPortal()
google()
}
}