2018-12-27 15:40:57 +01:00
apply plugin: 'com.android.application'
2018-01-23 00:18:43 +01:00
buildscript {
2013-10-14 16:10:58 +02:00
repositories {
2014-09-23 16:39:28 +02:00
jcenter ( )
2018-03-24 20:21:02 +01:00
google ( )
2013-10-14 16:10:58 +02:00
}
dependencies {
2020-03-11 02:00:25 -04:00
classpath 'com.android.tools.build:gradle:3.6.1'
2013-10-14 16:10:58 +02:00
}
}
2013-07-24 18:42:33 +02:00
2013-10-14 16:10:58 +02:00
android {
2020-03-11 02:01:27 -04:00
compileSdkVersion 29
2016-05-19 09:38:24 -07:00
defaultConfig {
2018-05-20 23:35:07 +02:00
minSdkVersion 14
2020-03-11 02:01:27 -04:00
targetSdkVersion 29
2020-02-09 21:49:41 +01:00
proguardFiles getDefaultProguardFile ( 'proguard-android.txt' ) , 'proguard-rules.pro'
2016-03-03 11:16:26 -08:00
}
2015-07-18 18:57:09 +05:30
dexOptions {
2016-06-12 21:07:01 +02:00
javaMaxHeapSize "2g"
2015-07-18 18:57:09 +05:30
}
2016-05-19 09:38:24 -07:00
compileOptions {
2018-05-09 14:02:56 +02:00
sourceCompatibility JavaVersion . VERSION_1_8
targetCompatibility JavaVersion . VERSION_1_8
2014-11-22 17:04:37 -08:00
}
2018-10-16 14:39:00 +02:00
sourceSets {
2014-11-22 17:04:37 -08:00
main {
manifest . srcFile 'AndroidManifest.xml'
java . srcDirs = [ 'src' ]
resources . srcDirs = [ 'resources' ]
res . srcDirs = [ 'res' ]
assets . srcDirs = [ 'assets' ]
}
2019-02-11 21:44:30 +01:00
test {
2015-06-10 12:29:53 +05:30
java . srcDirs = [ 'tests' ]
}
2013-10-14 16:10:58 +02:00
}
2014-01-10 23:26:32 +01:00
packagingOptions {
2019-03-21 09:49:49 +01:00
merge "META-INF/DEPENDENCIES"
merge "META-INF/LICENSE"
merge "META-INF/NOTICE"
2014-01-10 23:26:32 +01:00
}
2014-03-29 01:47:15 +01:00
lintOptions {
abortOnError false
2015-01-31 00:49:39 -08:00
checkReleaseBuilds false
2014-03-29 01:47:15 +01:00
}
2019-09-07 14:31:55 +02:00
signingConfigs {
debug {
storeFile file ( "debug.keystore" )
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
2014-07-04 21:14:14 +02:00
buildTypes {
2016-06-16 23:47:11 +02:00
debug {
2020-02-09 21:49:41 +01:00
minifyEnabled true
2019-09-07 14:31:55 +02:00
signingConfig signingConfigs . debug
2016-06-16 23:47:11 +02:00
}
2020-03-11 01:00:53 -04:00
// keep minifyEnabled false above for faster builds; set to 'true'
// when testing to make sure ProGuard/R8 is not deleting important stuff
release {
2015-06-13 20:58:59 -07:00
minifyEnabled true
}
2014-07-04 21:14:14 +02:00
}
2013-10-14 16:10:58 +02:00
}
2013-10-29 16:17:18 +01:00
dependencies {
2016-06-12 21:07:01 +02:00
2013-11-02 17:46:20 +01:00
repositories {
2018-01-23 00:18:43 +01:00
jcenter ( )
2018-03-24 20:21:02 +01:00
google ( )
2019-03-08 13:44:54 +01:00
/ * Needed for org . apache . sshd debugging
maven {
url "https://jitpack.io"
}
* /
2013-11-02 17:46:20 +01:00
}
2016-06-12 21:07:01 +02:00
2019-09-07 14:28:42 +02:00
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
2020-02-09 21:49:41 +01:00
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
2020-03-27 20:23:02 +01:00
implementation 'androidx.gridlayout:gridlayout:1.0.0'
2020-02-09 21:49:41 +01:00
implementation 'com.google.android.material:material:1.1.0'
Add album cover art support.
Summary:
Fetches http(s) album art urls, as supplied by MPRIS, to display as album art. Fetched urls and failed fetches are cached to prevent unneccessary network activity.
The bulk of the code is in the fetching+caching class `AlbumArtCache`.
Takes the comments from d52be10 into account:
- The images (HTTP(S) only for now) are cached. This is limited to 5 MB on disk or 10 entries in memory.
- The image gets viewing space depending on the remaining screen space. Thus, controls should never be pushed off-screen.
- "Edge cases" like going from cover art to no cover art is handled correctly (actually a result of earlier mpris code changes).
Additionally, it adds a landscape mode to the MPRIS activity, which shows the cover art and controls side by side.
Desktop part is in D9563.
FEATURE: 345015
Test Plan: Works both with/without album art. Switching players and tracks correctly changes the album art.
Reviewers: #kde_connect, #vdg, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, ngraham, nicolasfella, apol
Differential Revision: https://phabricator.kde.org/D9564
2017-12-11 15:36:57 +01:00
implementation 'com.jakewharton:disklrucache:2.0.2' //For caching album art bitmaps
2019-06-27 10:12:22 -04:00
implementation 'com.jaredrummler:android-device-names:1.1.9' //To get a human-friendly device name
2015-08-10 00:26:58 -07:00
2018-11-02 13:02:49 +01:00
implementation 'org.apache.sshd:sshd-core:0.14.0'
2019-10-27 20:39:28 +01:00
implementation 'org.apache.mina:mina-core:2.0.19' //For some reason, makes sshd-core:0.14.0 work without NIO, which isn't available until Android 8 (api 26)
2016-01-10 08:22:56 -08:00
2019-03-08 13:44:54 +01:00
//implementation('com.github.bright:slf4android:0.1.6') { transitive = true } // For org.apache.sshd debugging
2018-06-07 00:02:55 +02:00
implementation 'com.madgag.spongycastle:bcpkix-jdk15on:1.58.0.0' //For SSL certificate generation
2016-06-12 21:07:01 +02:00
2020-03-11 01:47:20 -04:00
//noinspection AnnotationProcessorOnCompilePath - c.f. https://issuetracker.google.com/issues/140881211
implementation 'com.jakewharton:butterknife:10.2.1'
2019-01-15 15:15:12 +01:00
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
2018-12-07 19:04:34 +01:00
2019-02-11 20:04:40 +01:00
implementation 'org.atteo.classindex:classindex:3.6'
annotationProcessor 'org.atteo.classindex:classindex:3.6'
2016-06-12 21:07:01 +02:00
// Testing
2018-01-23 00:21:57 +01:00
testImplementation 'junit:junit:4.12'
2019-02-11 21:44:30 +01:00
testImplementation 'org.powermock:powermock-core:2.0.0'
testImplementation 'org.powermock:powermock-module-junit4:2.0.0'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.0'
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'org.skyscreamer:jsonassert:1.3.0'
2013-10-29 16:17:18 +01:00
}
2020-03-27 20:23:02 +01:00
repositories {
google ( )
}