-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump to expo 51 * fix gradle build * update gradle build * fix deps / fix gradle build
- Loading branch information
Showing
10 changed files
with
6,715 additions
and
6,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,31 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'maven-publish' | ||
|
||
group = 'expo.modules.shareintent' | ||
version = '0.1.0' | ||
version = '2.0.0' | ||
|
||
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") | ||
if (expoModulesCorePlugin.exists()) { | ||
apply from: expoModulesCorePlugin | ||
applyKotlinExpoModulesCorePlugin() | ||
// Remove this check, but keep the contents after SDK49 support is dropped | ||
if (safeExtGet("expoProvidesDefaultConfig", false)) { | ||
useExpoPublishing() | ||
useCoreDependencies() | ||
} | ||
} | ||
|
||
apply from: expoModulesCorePlugin | ||
applyKotlinExpoModulesCorePlugin() | ||
useExpoPublishing() | ||
useCoreDependencies() | ||
// use the managed Android SDK versions from expo-modules-core | ||
useDefaultAndroidSdkVersions() | ||
|
||
buildscript { | ||
// Simple helper that allows the root project to override versions declared by this library. | ||
ext.safeExtGet = { prop, fallback -> | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
|
||
// Ensures backward compatibility | ||
ext.getKotlinVersion = { | ||
if (ext.has("kotlinVersion")) { | ||
ext.kotlinVersion() | ||
} else { | ||
ext.safeExtGet("kotlinVersion", "1.8.10") | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") | ||
} | ||
} | ||
|
||
// Remove this if and it's contents, when support for SDK49 is dropped | ||
if (!safeExtGet("expoProvidesDefaultConfig", false)) { | ||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
from components.release | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url = mavenLocal().url | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
android { | ||
// Remove this if and it's contents, when support for SDK49 is dropped | ||
if (!safeExtGet("expoProvidesDefaultConfig", false)) { | ||
compileSdkVersion safeExtGet("compileSdkVersion", 34) | ||
|
||
defaultConfig { | ||
minSdkVersion safeExtGet("minSdkVersion", 23) | ||
targetSdkVersion safeExtGet("targetSdkVersion", 34) | ||
} | ||
|
||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
} | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION | ||
if (agpVersion.tokenize('.')[0].toInteger() < 8) { | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
targetCompatibility JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.majorVersion | ||
} | ||
} | ||
|
||
namespace "expo.modules.shareintent" | ||
namespace "${group}" | ||
defaultConfig { | ||
versionCode 1 | ||
versionName "0.1.0" | ||
} | ||
} | ||
|
||
dependencies { | ||
// Remove this if and it's contents, when support for SDK49 is dropped | ||
if (!safeExtGet("expoProvidesDefaultConfig", false)) { | ||
implementation project(':expo-modules-core') | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" | ||
versionName "${version}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.