Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): Generate apk artifact
- Loading branch information
Showing
9 changed files
with
131 additions
and
33 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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
def publish = project.tasks.create("assembleReleaseAndPublish") | ||
publish.description "Assemble and copies release apk to custom directory" | ||
|
||
android { | ||
applicationVariants.all { variant -> | ||
variant.outputs.each { output -> | ||
// Copy apk to custom dir | ||
if (variant.buildType.name.equals("release") | ||
&& project.hasProperty('BERTY_APK_OUTPUT_DIR') | ||
&& output.outputFile != null | ||
&& output.outputFile.name.endsWith('.apk')) { | ||
|
||
def task = project.tasks.create("copy${variant.name}Apk", Copy) | ||
task.doFirst { | ||
println "Creating ${rootProject.name} (${versionName}.${versionCode}) from ${project.name}-${variant.name}.apk" | ||
} | ||
|
||
def outputFile = output.outputFile | ||
|
||
|
||
def fileName = outputFile.name.replace(project.name + "-${variant.name}.apk", "${rootProject.name}.apk") | ||
output.outputFileName = new File(fileName) | ||
|
||
task.from(output.outputFile) | ||
task.into(BERTY_APK_OUTPUT_DIR) | ||
|
||
task.dependsOn variant.assemble | ||
publish.dependsOn task | ||
} | ||
} | ||
} | ||
} |
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
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
3 changes: 2 additions & 1 deletion
3
client/react-native/android/gradle/wrapper/gradle-wrapper.properties
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,5 +1,6 @@ | ||
#Wed Dec 05 15:26:05 CET 2018 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip |
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,19 +1,20 @@ | ||
rootProject.name = 'Berty' | ||
include ':react-native-camera' | ||
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android') | ||
include ':react-native-vector-icons' | ||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') | ||
include ':react-native-svg' | ||
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') | ||
include ':react-native-restart' | ||
project(':react-native-restart').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-restart/android') | ||
include ':react-native-exception-handler' | ||
project(':react-native-exception-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-exception-handler/android') | ||
|
||
include ':ble', ':core' | ||
include ':react-native-vector-icons' | ||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') | ||
include ':react-native-network-info' | ||
project(':react-native-network-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-network-info/android') | ||
include ':react-native-image-picker' | ||
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android') | ||
include ':react-native-exception-handler' | ||
project(':react-native-exception-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-exception-handler/android') | ||
include ':react-native-camera' | ||
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android') | ||
include ':react-native-svg' | ||
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') | ||
|
||
include ':ble', ':core' | ||
include ':app' |