Add less-intrusive nightly configuration for gradle (#551)

This commit is contained in:
Antic1tizen One 2017-02-25 12:07:06 +03:00 committed by Adrian Ulrich
parent 973afb847b
commit eb3b0d4c1d
6 changed files with 60 additions and 9 deletions

View File

@ -19,6 +19,7 @@ apply plugin: 'com.android.application'
android {
lintOptions {
disable 'MissingTranslation'
disable 'ExtraTranslation'
}
compileSdkVersion 25
@ -34,15 +35,40 @@ android {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
nightly {
res.srcDirs = ['resNightly']
}
}
buildTypes {
nightly {
def buildId = 'date +%s'.execute().in.readLines()[0]
versionNameSuffix '-' + buildId
applicationIdSuffix '.nightly'
preBuild.finalizedBy 'customPrepareResources'
task ('customPrepareResources') {
doLast {
println 'Converting icons to nightly...'
fileTree('res').include('drawable-*/icon.png').each {
println it
"mogrify -fuzz 40% -fill 'rgb(0,102,102)' -opaque 'rgb(255,102,0)' $it".execute()
}
println 'Replacing `about` info to nightly...'
def about = file('assets/about.html')
about.text = about.text.replaceAll('<b>Version.*', "<b>Nightly build ID:</b> ${buildId}<br><br>")
}
}
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
@ -52,4 +78,4 @@ android {
lintOptions {
abortOnError false
}
}
}

View File

@ -22,7 +22,7 @@ THE SOFTWARE.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:vanilla="http://schemas.android.com/apk/res/ch.blinkenlights.android.vanilla"
xmlns:vanilla="http://schemas.android.com/apk/res-auto"
android:persistent="true">
<PreferenceScreen
android:fragment="ch.blinkenlights.android.vanilla.PreferencesActivity$EqualizerFragment"

View File

@ -22,7 +22,7 @@ THE SOFTWARE.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:vanilla="http://schemas.android.com/apk/res/ch.blinkenlights.android.vanilla"
xmlns:vanilla="http://schemas.android.com/apk/res-auto"
android:persistent="true">
<CheckBoxPreference
android:key="disable_lockscreen"

View File

@ -22,7 +22,7 @@ THE SOFTWARE.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:vanilla="http://schemas.android.com/apk/res/ch.blinkenlights.android.vanilla"
xmlns:vanilla="http://schemas.android.com/apk/res-auto"
android:persistent="true">
<CheckBoxPreference
android:key="enable_track_replaygain"
@ -57,11 +57,11 @@ THE SOFTWARE.
vanilla:sbpSummaryFormat="%s %.1fdB"
vanilla:sbpSummaryValueAddition="-150"
vanilla:sbpSummaryValueMultiplication="0.1" />
<Preference
android:selectable="false"
android:title="@string/replaygain_preamp_note_title"
android:summary="@string/replaygain_preamp_note_content"
/>
</PreferenceScreen>

View File

@ -22,7 +22,7 @@ THE SOFTWARE.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:vanilla="http://schemas.android.com/apk/res/ch.blinkenlights.android.vanilla"
xmlns:vanilla="http://schemas.android.com/apk/res-auto"
android:persistent="true">
<CheckBoxPreference
android:key="enable_shake"

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 Oleg `Kanedias` Chernovskiy <kanedias@xaker.ru>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<resources>
<string name="app_name">Vanilla Music Nightly</string>
</resources>