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

feat: use RN builder bob #982

Closed
wants to merge 1 commit into from
Closed
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.js

This file was deleted.

67 changes: 27 additions & 40 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#
.DS_Store

# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Xcode
#
build/
Expand All @@ -22,52 +29,32 @@ DerivedData
*.xcuserstate
project.xcworkspace

# node.js
# Android/IJ
#
node_modules/
npm-debug.log

# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class
*.iml
*.aar
*.zip

# Generated files
bin/
gen/

# Gradle files
.idea
.gradle
local.properties
*.iml
local.properties
.idea/workspace.xml
.idea/libraries
build
captures
.gradle/
build/
android.iml

# Local configuration file (sdk path, etc)
local.properties
# Cocoapods
#
example/ios/Pods

# Proguard folder generated by Eclipse
proguard/
# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# Log Files
*.log
# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore

# Android Studio Navigation editor temp files
.navigation/
# Expo
.expo/*

# Android Studio captures folder
captures/
# generated by bob
lib/
51 changes: 0 additions & 51 deletions .npmignore

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "all"
}
3 changes: 3 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Override Yarn command so we can automatically setup the repo on running `yarn`

yarn-path "scripts/bootstrap.js"
28 changes: 12 additions & 16 deletions RNGoogleSignin.podspec
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
require 'json'
require "json"

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = 'RNGoogleSignin'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
s.license = package['license']
s.author = package['author']
s.homepage = package['homepage']
s.source = { :git => 'https://github.com/react-native-community/google-signin.git', :tag => "v#{s.version}" }
s.name = "RNGoogleSignin"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.requires_arc = true
s.static_framework = true
s.platform = :ios, '9.0'
s.preserve_paths = 'LICENSE', 'README.md'
s.platforms = { :ios => "11.0" }
s.source = { :git => "https://github.com/react-native-google-signin/google-signin.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm}"

s.source_files = "ios/RNGoogleSignin/*.{h,m}"
s.dependency "React-Core"
s.dependency "GoogleSignIn", "~> 5.0.0"
end
74 changes: 39 additions & 35 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,54 +1,58 @@
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

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
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
mavenCentral()
}

dependencies {
classpath("com.android.tools.build:gradle:3.6.3")
}
}
}
if (project == rootProject) {
repositories {
google()
jcenter()
}

allprojects {
repositories {
google()
mavenCentral()
maven { url "$projectDir/../node_modules/react-native/android" }
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
}

apply plugin: 'com.android.library'

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

android {
compileSdkVersion safeExtGet('GoogleSignin_compileSdkVersion', 29)
buildToolsVersion safeExtGet('GoogleSignin_buildToolsVersion', '29.0.2')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 18)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
minSdkVersion safeExtGet('GoogleSignin_minSdkVersion', 16)
targetSdkVersion safeExtGet('GoogleSignin_targetSdkVersion', 29)
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}

}

buildTypes {
release {
minifyEnabled false
}
}
lintOptions {
abortOnError false
disable 'GradleCompatible'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
google()
jcenter()
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "com.google.android.gms:play-services-auth:${safeExtGet('googlePlayServicesAuthVersion', '17.0.0')}"
implementation "com.facebook.react:react-native:+"
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
}
2 changes: 0 additions & 2 deletions android/gradle.properties

This file was deleted.

Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading