Skip to content

Instantly share code, notes, and snippets.

@OleksandrKucherenko
Created February 7, 2020 11:04
Show Gist options
  • Save OleksandrKucherenko/c0d01db313a348b1e54b214daf9e1589 to your computer and use it in GitHub Desktop.
Save OleksandrKucherenko/c0d01db313a348b1e54b214daf9e1589 to your computer and use it in GitHub Desktop.
Custom tasks that synchronise library source code with Sample that demonstrate library usage
val updateLibrarySourcesInExample by tasks.registering(Copy::class) {
into("${rootProject.projectDir}/KeychainExample/node_modules/react-native-keychain/")
from("${rootProject.projectDir}/android/src/"){
into("android/src")
}
from("${rootProject.projectDir}/typings/"){
into("typings")
}
from("${rootProject.projectDir}/RNKeychainManager"){
into("RNKeychainManager")
}
from("${rootProject.projectDir}/RNKeychain.xcodeproj"){
into("RNKeychain.xcodeproj")
}
from("${rootProject.projectDir}/index.js")
}
tasks.register("build") {
dependsOn(
updateLibrarySourcesInExample,
gradle.includedBuild("android").task(":app:assemble")
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment