1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-02 01:01:17 +00:00
syncthing-android/app/build.gradle

108 lines
3.4 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.application'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.github.triplet.play'
dependencies {
2017-12-05 11:53:33 +00:00
implementation 'eu.chainfire:libsuperuser:1.0.0.201704021214'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
2017-12-05 11:53:33 +00:00
implementation 'com.google.zxing:android-integration:3.3.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'org.mindrot:jbcrypt:0.4'
// com.google.guava:guava:24.1-jre will crash on Android 5.x
implementation 'com.google.guava:guava:26.0-android'
2017-12-05 11:53:33 +00:00
implementation 'com.annimon:stream:1.1.9'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.dagger:dagger:2.14.1'
annotationProcessor "com.google.dagger:dagger-compiler:2.14.1"
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
}
android {
2017-12-26 18:47:23 +00:00
// Changes to these values need to be reflected in `.travis.yml`
compileSdkVersion 28
buildToolsVersion '28.0.3'
2017-12-26 18:47:23 +00:00
buildTypes.debug.applicationIdSuffix ".debug"
dataBinding.enabled = true
playAccountConfigs {
defaultAccountConfig {
jsonFile = file(System.getenv("SYNCTHING_RELEASE_PLAY_ACCOUNT_CONFIG_FILE") ?: 'keys.json')
}
}
defaultConfig {
applicationId "com.github.catfriend1.syncthingandroid"
2018-04-27 22:29:25 +00:00
minSdkVersion 16
targetSdkVersion 26
Refactor ConfigXml (#135) Changelog: - "Use default folder path given in config.xml" (#101) - "IllegalStateException: Fragment already added" (#108) - "Enhancement request for per-folder(device) sync conditions" (#110) - "NPE crash after key and config regeneration" (#141) - "Adjust the folder icon to show if it's send/receive or both" (#143) - "CPU percentage is not shown on the status tab" (#144) - "Always make individual sync conditions UI available" (#145) - "IntroducedBy deviceID lost on config change through wrapper UI" (#146) - "Wrapper doesn't use the same syntax as syncthing core's web UI for device addresses" (#147) - "Syncthing wrapper "emergency" shutdown on native binary crash doesn't work" (#148) Commits: * WIP * WIP * Get folder list and paused setting when syncthing is not running Preparation to solve #110 * Fix NPE in DeviceListFragment#DEVICES_COMPARATOR * Remove blank line * Add ConfigXml#getDevices and comparator Make ConfigXml#saveChanges public * SyncthingService evaluates per folder/device sync conditions when syncthing is not running via ConfigXml * Fix typos and add stubs * Fix build errors * DEBUG - Always run syncthing binary * Fix NPE at RunConditionMonitor pointer * Add setFolderPause, setDevicePause to ConfigXml * Improve logging * Remove test mode * Better log levels * Make ConfigXml#updateIfNeeded private * Remove SyncthingService#mStartupTask AsyncTask no longer needed * Update model/Options (fixes #101) * Fix NPE after config regeneration (fixes #140) * Refactor key and config generation Refactor ConfigXml public functions to allow checking if a valid config exists and trigger key and config (re)genration if something is corrupted. * Fix crash on export/import (fixes #142) * ApiRequest - Disable verbose log in release builds * ConfigXml#updateIfNeeded - Disable "startBrowser" because it applies to desktop environments and cannot start a mobile browser app * MainActivity - Always show all tabs * Show folder/device tab contents from config.xml if syncthing is not running * Update ConfigXml#getDevices return model - compression - introducer * Device tab - Hide in/out rate if syncthing is not running or if the device is paused * Update device item layout * MainActivity/Devices - Prevent showing outdated status after syncthing core transitioned from "active" to "disabled" * MainActivity/Folders - Prevent showing outdated status after syncthing core transitioned from "active" to "disabled" * Add ConfigRouter class Provides a transparent access to the config if ... a) Syncthing is running and REST API is available. b) Syncthing is NOT running and config.xml is accessed. * Add pref - Cache local device ID * Allow excluding self in ConfigRouter#getDevices * Allow excluding self in ConfigRouter#getDevices (2) * Update Folder model default values * Update Folder model defaults (2) - copiers - hashers * WIP - ConfigXml - FolderActivity Remove unused pref inject code Cache local device ID in pref Reduce verbose logging in release builds Extend ConfigXml#getFolders Extend ConfigXml#getDevices Fix ConfigXml#setDevicePause ToDo ConfigXml#getFolderIgnoreList needs to be implemented * Implemented ConfigXml#getFolderIgnoreList * Extend ConfigXml#getDevices - device.addresses * WIP - DeviceActivity Make it available when syncthing is not running * Fix unsuccessful API bumps while syncthing is starting * Fix space * Adjust the folder icon to show if it's send/receive or both (fixes #143) * Fix lint - item_device_list * Preserve active tab when syncthing core transitions between running and not running * Add xmlns:android to item_folder_list * Remove unused reference from item_folder_list * Add device icon to device tab * Fix CPU percentage not showing (fixes #144) * SyncthingService - Polish iterator code * Fix MainActivity#updateViewPager (fixes #108) * Add ConfigXml#updateFolder, updateDevice (1) * Add ConfigRouter#updateFolder, updateDevice * Add missing "final" to ConfigXml#updateDevice * WIP - FolderActivity - Update updateFolder via ConfigRouter ToDo: Implement ConfigRouter here. * ConfigRouter - Fix missing return * DeviceActivity - Update device via ConfigRouter * Always make individual sync conditions UI available (fixes #145) regardless if syncthing core is running or not. Remove SyncthingService dependency from SyncConditionsActivity * Fix incorrect folder type icon shown when syncthing core is not running * Add "introducedBy" to folder and device model (fixes #146) * Add Folder#getDevices to model * ConfigXml#updateFolder - Writeback devices sharing the folder Support preserving the "introducedBy" model field of Folder.java (fixes #146) * Add ConfigXml#updateFolder - Versioning * Remove SyncthingService dependency from FolderPickerActivity because it is no longer required. * Update ToDo remarks * Add ConfigXml#updateDevice - Addresses * Fix DeviceActivity#persistableAddresses to be more graceful (fixes #147) and accept the same address syntax as syncthing core web UI does. * Add ConfigXml#removeFolder, removeDevice * Add ConfigXml#addDevice, addFolder - Add ConfigXml#isDeviceIdValid - Do not allow adding empty folder labels or empty device names. - Update model Folder.java so ConfigXml can handle the ignorePerms XML attribute * Fix Syncthing wrapper "emergency" shutdown on native binary crash (fixes #148) * Update translation de * Add ConfigXml#postFolderIgnoreList * Update APK version to 0.14.54.3 / 4182 * Revert DEBUG - Always run syncthing binary * Update whatsnew
2018-12-22 00:58:44 +00:00
versionCode 4182
versionName "0.14.54.3"
testApplicationId 'com.github.catfriend1.syncthingandroid.test'
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
playAccountConfig = playAccountConfigs.defaultAccountConfig
}
signingConfigs {
release {
storeFile = {
def path = System.getenv("SYNCTHING_RELEASE_STORE_FILE")
return (path) ? file(path) : null
}()
storePassword System.getenv("SIGNING_PASSWORD") ?: ""
keyAlias System.getenv("SYNCTHING_RELEASE_KEY_ALIAS") ?: ""
keyPassword System.getenv("SIGNING_PASSWORD") ?: ""
}
}
buildTypes {
release {
signingConfig = signingConfigs.release.storeFile ? signingConfigs.release : null
}
debug {
gradle.buildFinished {
buildResult -> if (!buildResult.failure) {
pushToDevice.execute()
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError true
}
}
play {
jsonFile = file(System.getenv("SYNCTHING_RELEASE_PLAY_ACCOUNT_CONFIG_FILE") ?: 'keys.json')
uploadImages = false
2018-04-18 22:46:20 +00:00
track = 'beta'
}
tasks.whenTaskAdded { task ->
if (task.name == 'compileDebugSources') {
task.dependsOn lint
task.mustRunAfter lint
}
}
/**
* Some languages are not supported by Google Play, so we ignore them.
*/
task deleteUnsupportedPlayTranslations(type: Delete) {
delete 'src/main/play/nn'
delete 'src/main/play/el-EL'
delete 'src/main/play/nb'
delete 'src/main/play/en/'
}
task pushToDevice(type: Exec) {
executable = 'python'
args = ['-u', './push-to-device.py']
}