Skip to content

Commit

Permalink
chore: bump android
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Nov 27, 2022
1 parent 007c5b6 commit c5af170
Show file tree
Hide file tree
Showing 7 changed files with 1,445 additions and 1,500 deletions.
69 changes: 38 additions & 31 deletions android/build.gradle
Expand Up @@ -10,20 +10,32 @@
// original location:
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle

def DEFAULT_COMPILE_SDK_VERSION = 29
def DEFAULT_BUILD_TOOLS_VERSION = '29.0.3'
def DEFAULT_MIN_SDK_VERSION = 16
def DEFAULT_COMPILE_SDK_VERSION = 30
def DEFAULT_BUILD_TOOLS_VERSION = '30.0.3'
def DEFAULT_MIN_SDK_VERSION = 21
def DEFAULT_TARGET_SDK_VERSION = 29
def DEFAULT_NDK_API_LEVEL = 21
def DEFAULT_NDK_API_LEVEL = 24

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: "com.android.library"
apply plugin: 'org.mozilla.rust-android-gradle.rust-android'

def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

allprojects {
// https://github.com/facebook/react-native/issues/35210
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
}

buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
Expand All @@ -33,17 +45,18 @@ buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'org.mozilla.rust-android-gradle:plugin:0.9.3'
classpath 'com.android.tools.build:gradle:4.2.2'
}
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'org.mozilla.rust-android-gradle.rust-android'

android {
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
Expand Down Expand Up @@ -82,6 +95,9 @@ repositories {
// Android JSC is installed from npm
url "$rootDir/../node_modules/jsc-android/dist"
}
maven {
url "https://plugins.gradle.org/m2/"
}
google()
jcenter()
}
Expand Down Expand Up @@ -127,17 +143,17 @@ def configureReactNativePom(def pom) {
afterEvaluate { project ->
// some Gradle build hooks ref:
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
task androidJavadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += files(android.bootClasspath)
classpath += files(project.getConfigurations().getByName('compile').asList())
include '**/*.java'
}

task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
classifier = 'javadoc'
from androidJavadoc.destinationDir
}
// task androidJavadoc(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// classpath += files(android.bootClasspath)
// classpath += files(project.getConfigurations().getByName('compile').asList())
// include '**/*.java'
// }

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

task androidSourcesJar(type: Jar) {
classifier = 'sources'
Expand All @@ -163,15 +179,6 @@ afterEvaluate { project ->

artifacts {
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
}
// archives androidJavadocJar
}
}
1 change: 1 addition & 0 deletions android/gradle.properties
@@ -0,0 +1 @@
android.useAndroidX=true
10 changes: 5 additions & 5 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "@emurgo/react-native-haskell-shelley",
"title": "React Native Haskell Shelley",
"version": "3.1.4",
"version": "4.0.0",
"description": "React-native bindings for Emurgo's cardano-serialization-lib (Cardano haskell Shelley)",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -39,16 +39,16 @@
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"peerDependencies": {
"react": "^16.8.1",
"react-native": ">=0.60.0-rc.0 <1.0.x"
"react": "^17.0.2",
"react-native": ">=0.67.5 <1.0.x"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"eslint": "7.8.1",
"flowgen": "1.13.0",
"react": "^16.9.0",
"react-native": "^0.60.0",
"react": "^17.0.2",
"react-native": "^0.67.5",
"typescript": "^4.1.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion react-native-haskell-shelley.podspec
Expand Up @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
# optional - use expanded license entry instead:
# s.license = { :type => "MIT", :file => "LICENSE" }
s.authors = { "emurgo" => "contact@emurgo.io" }
s.platforms = { :ios => "9.0" }
s.platforms = { :ios => "1111111111111111111111.0" }
s.source = { :git => "https://github.com/Emurgo/react-native-haskell-shelley.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,c,m,swift,sh}"
Expand Down
4 changes: 3 additions & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "react-native-haskell-shelley"
version = "3.1.4"
version = "4.0.0"
authors = ["EMURGO R&D"]
edition = "2018"

Expand Down

0 comments on commit c5af170

Please sign in to comment.