1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-24 21:32:07 +01:00
dandelion/app/build.gradle

110 lines
3.3 KiB
Groovy
Raw Permalink Normal View History

2016-03-03 17:46:31 +01:00
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
2016-03-03 17:46:31 +01:00
android {
2016-07-04 14:12:45 +02:00
compileSdkVersion 24
2016-10-14 00:22:08 +02:00
buildToolsVersion "24.0.3"
2016-03-03 17:46:31 +01:00
defaultConfig {
2016-03-29 19:38:50 +02:00
applicationId "com.github.dfa.diaspora_android"
2016-08-06 22:53:20 +02:00
minSdkVersion 17
2016-07-04 14:12:45 +02:00
targetSdkVersion 24
2016-11-04 03:08:59 +01:00
versionCode 9
versionName "0.2.0"
2016-10-31 07:15:29 +01:00
setProperty("archivesBaseName", "diasporaAndroid__${versionName}__")
2016-11-04 03:08:59 +01:00
vectorDrawables.useSupportLibrary = true
2016-03-03 17:46:31 +01:00
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
2016-07-27 21:54:54 +02:00
lintOptions {
disable 'MissingTranslation'
}
2016-03-03 17:46:31 +01:00
}
2016-11-04 03:08:59 +01:00
// Additional repositories
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
repositories {
maven {
url "https://jitpack.io"
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
}
}
2016-03-03 17:46:31 +01:00
dependencies {
2016-05-05 17:42:29 +02:00
// Sub-Projects
//compile project(':subprojectFromRoot')
// Jars
2016-03-03 17:46:31 +01:00
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
2016-05-05 17:42:29 +02:00
// Android standard libs
compile 'com.android.support:appcompat-v7:24.2.1'
2016-11-04 03:08:59 +01:00
compile 'com.android.support:design:24.1.0' //Don't update. Broken up to 25.0.0
compile 'com.android.support:support-v4:24.2.1'
2016-11-04 03:08:59 +01:00
compile 'com.android.support:customtabs:24.2.1'
2016-05-05 17:42:29 +02:00
// More libraries
compile 'com.jakewharton:butterknife:8.0.1'
compile 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
compile 'info.guardianproject.netcipher:netcipher-webkit:2.0.0-alpha1'
compile 'com.github.DASAR:ShiftColorPicker:v0.5'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
2016-11-04 03:08:59 +01:00
// #####################
// Groovy Coding Area
// #####################
final String RAW_DIR = "app/src/main/res/raw"
final String[] ROOT_TO_RAW_COPYFILES = ["README.md", "LICENSE.md", "CHANGELOG.md", "CONTRIBUTORS.txt"]
final String PODLIST_URL = 'https://raw.githubusercontent.com/Diaspora-for-Android/diaspora-android-extras/master/podList/podlist.json'
final String PODLIST_PATH = "${RAW_DIR}/podlist.json"
2016-11-04 03:08:59 +01:00
// Called before building
task copyRepoFiles(type: Copy) {
2016-11-04 03:08:59 +01:00
// Copy files over to raw dir
from rootProject.files(ROOT_TO_RAW_COPYFILES)
into RAW_DIR.replaceFirst("app/", "")
rename { String fileName ->
fileName.replace(fileName, fileName.toLowerCase())
}
// Filter Contributors file
from(rootProject.file("CONTRIBUTORS.txt")) {
into '.' // Target already changed to 'src/main/res/raw'
rename { String fileName ->
fileName.replace(fileName, fileName.toLowerCase())
}
filter { line ->
(line.toString().matches("..l>>.*") || line.toString().startsWith("## 99l CONTRIBUTORS")) ? null : line.toString().trim().replaceAll(" \\(.*\\)", "")
}
}
2016-11-04 03:08:59 +01:00
// Download PodList
2016-11-02 17:10:29 +01:00
downloadFile(PODLIST_PATH, PODLIST_URL, false)
2016-11-04 03:08:59 +01:00
// Application variants
android.applicationVariants.all { v ->
// Do if we build in release (signed apk) mode
if (v.buildType.name == "release") {
downloadFile(PODLIST_PATH, PODLIST_URL, true)
2016-11-02 17:10:29 +01:00
}
}
}
2016-11-04 03:08:59 +01:00
// Downloads a file
def downloadFile(filePath, url, downloadIfExists) {
2016-11-02 17:10:29 +01:00
def f = new File(filePath)
2016-11-04 03:08:59 +01:00
f.exists() && downloadIfExists && f.delete();
2016-11-02 17:10:29 +01:00
if (!f.exists()) {
2016-11-04 03:08:59 +01:00
new URL(url).withInputStream { i -> f.withOutputStream { it << i } }
2016-11-02 17:10:29 +01:00
}
2016-03-03 17:46:31 +01:00
}
2016-11-02 17:10:29 +01:00
2016-11-04 03:08:59 +01:00
tasks.copyRepoFiles.execute()