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

Attempt to upgrade Gradle to 7 and support Android 14 #3

Merged
merged 12 commits into from
Oct 27, 2024
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
29 changes: 11 additions & 18 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ buildscript {
}

dependencies {
// Matches the RN Hello World template
// https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L8
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.android.tools.build:gradle:7.0.4'
}
}

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

android {
compileSdkVersion 29
compileSdkVersion 34

defaultConfig {
minSdkVersion 23
targetSdkVersion 29
minSdkVersion 26
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -82,12 +80,17 @@ def configureReactNativePom(def pom) {
}
}


configurations {
customConfig.extendsFrom implementation
}

afterEvaluate { project ->

task androidJavadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += files(android.bootClasspath)
classpath += files(project.getConfigurations().getByName('compile').asList())
classpath += files(project.getConfigurations().getByName('customConfig').asList())
include '**/*.java'
}

Expand All @@ -113,14 +116,4 @@ afterEvaluate { project ->
archives androidSourcesJar
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
}
}
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip