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

fix: Fix Gradle configuration #205

Merged
merged 3 commits into from
Mar 22, 2022
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
44 changes: 28 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
OSX
#
.DS_Store

# Xcode
!**/*.xcodeproj
!**/*.pbxproj
!**/*.xcworkspacedata
!**/*.xcsettings
!**/*.xcscheme
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -19,22 +20,33 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
*.xcworkspace
/ios/Pods/

# Xcode, Gradle
# Android/IntelliJ
#
build/

# Android
.idea
.gradle
local.properties
*.iml
android/gradle/
android/gradlew
android/gradlew.bat

# Node
node_modules
*.log
.nvm
# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# OS X
.DS_Store
/.vscode
# BUCK
buck-out/
\.buckd/
*.keystore

# Editor config
.vscode

# Tests
coverage
52 changes: 19 additions & 33 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,67 +1,53 @@
// android/build.gradle

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()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath("com.android.tools.build:gradle:4.2.2")
}
}
}

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

def DEFAULT_COMPILE_SDK_VERSION = 28
def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
def DEFAULT_TARGET_SDK_VERSION = 28
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
compileSdkVersion safeExtGet('compileSdkVersion', 28)

defaultConfig {
minSdkVersion 16
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
versionCode 1
versionName "0.2.0"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
}

// needed for https://github.com/square/okio/issues/58
lintOptions {
warning 'InvalidPackage'
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"
}
google()
jcenter()
mavenLocal()
mavenCentral()
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.facebook.react:react-native:+'
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'
}
Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

172 changes: 0 additions & 172 deletions android/gradlew

This file was deleted.

Loading