Skip to content

Commit

Permalink
3.2.1-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
namidan committed Jul 23, 2024
1 parent 646dac4 commit 96405cf
Show file tree
Hide file tree
Showing 33 changed files with 671 additions and 861 deletions.
87 changes: 21 additions & 66 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import groovy.json.JsonSlurper

// android/build.gradle
// based on:
//
Expand All @@ -10,15 +8,15 @@ import groovy.json.JsonSlurper
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
// original location:
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
def DEFAULT_BUILD_TOOLS_VERSION = '30.0.2'
def DEFAULT_BUILD_TOOLS_VERSION = '34.0.0'
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
apply plugin: 'com.android.library'
// apply plugin: 'maven'
apply plugin: "kotlin-android"
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.8.20'
// 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
// module dependency in an application project.
Expand All @@ -29,13 +27,13 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
}
android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
defaultConfig {
minSdkVersion 22
Expand All @@ -44,28 +42,32 @@ android {
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
}
lintOptions {
abortOnError false
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
dexOptions {
javaMaxHeapSize "4g"
}
buildFeatures {
viewBinding true
}

flavorDimensions "store"
productFlavors {
amazon {
dimension "store"
}

play {
dimension "store"
}
}
}
repositories {
mavenCentral()
// ref: https://www.baeldung.com/maven-local-repository
mavenLocal()
maven { url("https://packages.namiml.com/NamiSDK/Amazon/") }
maven { url("https://packages.namiml.com/NamiSDK/Android/") }
maven { url 'https://jitpack.io' }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand All @@ -83,35 +85,12 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'com.github.jeziellago:compose-markdown:0.3.0'
compileOnly "com.namiml:sdk-amazon:3.2.0-beta.01"
playImplementation "com.namiml:sdk-android:3.2.1-beta.02"
amazonImplementation "com.namiml:sdk-amazon:3.2.1-beta.02"

implementation 'com.facebook.react:react-native:+' // From node_modules
implementation "com.facebook.react:react-native:+" // From node_modules
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
}
def configureReactNativePom(def pom) {
def packageJson = new JsonSlurper().parseText(file('../package.json').text)
pom.project {
name packageJson.title
artifactId packageJson.name
version = packageJson.version
group = "com.nami.reactlibrary"
description packageJson.description
url packageJson.repository.baseUrl
licenses {
license {
name packageJson.license
url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
distribution 'repo'
}
}
developers {
developer {
id packageJson.author.username
name packageJson.author.name
}
}
}

}

configurations {
Expand All @@ -121,39 +100,15 @@ configurations {
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())
// classpath += files(project.getConfigurations().getByName('customConfig').asList())
include '**/*.java'
}
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
classifier = 'javadoc'
from androidJavadoc.destinationDir
}
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
include '**/*.java'
}
android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
def javaCompileTask = variant.javaCompileProvider.get()
task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
from javaCompileTask.destinationDir
}
}
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
// }
}
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed May 26 17:12:26 EDT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
} else {
Arguments.createArray()
}
val settingsList = mutableListOf("extendedClientInfo:react-native:3.2.0")
val settingsList = mutableListOf("extendedClientInfo:react-native:3.2.1-beta.2")
namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
settingsList.addAll(commandsFromReact)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :

@ReactMethod
fun setAppSuppliedVideoDetails(url: String, name: String?) {
// To be implemented
NamiPaywallManager.setAppSuppliedVideoDetails(url = url, name = name)
}

@ReactMethod
Expand Down
Loading

0 comments on commit 96405cf

Please sign in to comment.