Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kingargyle committed Nov 10, 2018
2 parents 88a9771 + c9a3834 commit ba480ea
Show file tree
Hide file tree
Showing 953 changed files with 40,132 additions and 55,309 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ tmp
*.orig
.DS_S*
.factorypath

*.iml
gen-external-apklibs
gen
*.idea
.gradle
local.properties
build
keystore.properties

36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: android
android:
components:
- tools # to get the new `repository-11.xml`
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- platform-tools
- build-tools-28.0.2
- android-27
- android-28
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
- extra-google-google_play_services
jdk:
- oraclejdk8

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/nodejs/
- node_modules

before_install:
- pip install --user codecov

script:
- travis_wait 40 ./gradlew clean plex-rest-library:jacocoTestReport jacocoTestReportDebug

after_success:
- codecov

sudo: false
53 changes: 14 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Serenity for Android
=======================

[![Build Status](https://travis-ci.org/NineWorlds/serenity-android.svg?branch=develop)](https://travis-ci.org/NineWorlds/serenity-android) [![codecov](https://codecov.io/gh/NineWorlds/serenity-android/branch/develop/graph/badge.svg)](https://codecov.io/gh/NineWorlds/serenity-android)

Sonar Qube:
[![SonarQube](https://sonarcloud.io/api/badges/measure?key=serenity-android:serenity-app&metric=coverage)](https://sonarcloud.io/dashboard?id=serenity-android%3Aserenity-app)

Serenity for Android is a client for the Plex Media Server developed by Plex.
Serenity is not associated with Plex, Inc. If you value the Plex Media Server,
consider donating to that project to help fund continued development.
Expand All @@ -15,19 +20,15 @@ What does this support
* Browsing by Genre for TV Shows and Movies
* Browsing by Season for TV Shows
* Download Videos for offline playback
* Tablets and Android TV devices (running 3.2 or higher)
* Android TV and Fire TV devices running Android 4.1 or higher
* Playback videos from Queue
* Optional to playback movie trailers and episode previews from YouTube.
* Multiple views, from Grid View to Detail View.
* Auto discovery and works with all Plex 9 Media Servers, no server restriction.
* Second screen support including AllCast for Chromecasting your videos.
* Beta Music Library support.


What is currently not targeted:

* MyPlex access
* Transcoding
* Photo Browsing
* Adding/Managing Channels and addins

Expand Down Expand Up @@ -68,52 +69,27 @@ to help the project along as well. The app will probably be free in the playst
Building from Source
=============

This requires that you have used the maven-android-sdk-deployer project to
install and deploy the Android 3.2 SDK to your maven repository.

https://github.com/mosabua/maven-android-sdk-deployer

Make sure to set the ANDROID_HOME environement variable to the location where your SDK is deployed.

To build the APK and APKLibraries from the command line:

./mvnw clean install

The application APK will be in serenity-app/target. You can sideload this APK on your Android TV or Tablet device.

Using Eclipse to Build:
===============

These instructions are from an adopter of the project.

1. Install Android SDK (was already done)
2. install maven 3.1.1 from https://maven.apache.org/download.cgi
3. set envorinmentvariables ANDROID_HOME and MAVEN_HOME and add $MAVEN_HOME/bin, $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools to PATH
4. install eclipse plugin m2e from update site: http://www.eclipse.org/m2e/download/
5. install m2e-android from update site: http://rgladwell.github.com/m2e-android/updates/
6. install m2eclipse from marketplace (had to install the marketplace client before)
7. clone serenity repository
8. import existing maven project
9. update each project separatly over context menu Maven/Update project
10. copy project.properties from leftnavbarlibrary to menudrawer, edit the file in menudrawer-project and set target to android-17 to avoid NullPointerException during build
11. edit build-path for menudrawer and remove invalid system library and add your default jre-library
12. edit /serenity-app-tests/pom.xml and set robolectric to 2.2 according to my local repository
13. edit /serenity-app/pom.xml and change version for compatibility-v4 from 18 to 19.0.1 according to my local android sdk
14. select the error "Plugin execution not covered by lifecycle configuration...." in problem view and run the quick fix (ignore)
15. update all projects (maven / update projects) just to be sure.
16. Start serenity-app as android app and have fun. :-)

If you get errors because of @override-annotation, open project-settings, navigate to compiler-settings and set them from java 1.5 to 1.6
./gradlew clean assembleDebug

The application APK will be in serenity-app/build/outputs. You can sideload this APK on your Android TV or Fire TV device.

Open Source Projects:
=====

This project uses several open source projects and source code:

* LeftNavBarLibrary (http://code.google.com/p/googletv-android-samples/) from the google tv project. This is packaged as a apklib for reuse.
* Android-Universal-ImageLoader (https://github.com/nostra13/Android-Universal-Image-Loader) - a nice library for managing image caches and downloading of images in the background. Extremely fast response times both in the library and from the developer.
* Simple (http://simple.sourceforge.net/) - provides a nice interface to Serialize and Deserialize XML information.
* Dagger 1.2
* Retrofit 2
* OkHttp 3
* Android Priority Job Manager
* GreenRobot EventBus


Unit Testing Frameworks
------
Expand All @@ -128,4 +104,3 @@ Some layouts are influenced by the following skins. Some icons reused from the
* Aeon
* MediaStreamer
* Influence

68 changes: 68 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
buildscript {

ext {
kotlinVersion = "1.2.70"
}

repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
}

repositories {
jcenter()
mavenCentral()
google()
}

dependencies {
project(":serenity-common")
project(":serenity-android-common")
project(":subtitle-converter")
project(":plexapp-rest-library")
project(":emby-lib")
project(":serenity-app")
}

project.ext {
okhttpVersion = "3.8.1"
kotlinVersion = "1.2.70"
androidPriorityJobQueueVersion = "2.0.1"
daggerVersion = "1.2.5"
eventBus = "3.1.1"
moshiKotlinVersion = "1.6.0"
retrofitVersion = "2.4.0"
jodaTimeVersion = "2.9.9.4"
timberVersion = "4.7.1"
exoplayerVersion = "2.8.4"
glideOkHttpVersion = "1.5.0"
moxyVersion = "1.5.3"
glideVersion = "3.8.0"
googleAnalyticsVersion = "16.0.4"
androidSupportLibVersion = "27.1.1"
universalCharDetVersion = "1.0.3"
volleyVersion = "1.0.16"
dpadAwareVersion = "1.0.1"
butterKnifeVersion = "8.8.1"
simpleXmlVersion = "2.7.1"
urlManager = "1.4.0"

commonsLangVersion = "3.7"
junitVersion = "4.12"
assertjVersion = "3.11.1"
mockitoVersion = "2.21.0"
robolectricVersion = "4.0"
openglApiVersion = "gl1.1-android-2.1_r1"
xmlUnitVersion = "1.3"
assertJAndroidVersion = "1.1.1"
commonsioVersion = "2.6"
jacocoVersion = "0.8.2"
}
1 change: 1 addition & 0 deletions emby-lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
82 changes: 82 additions & 0 deletions emby-lib/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
buildscript {

repositories {
jcenter()
mavenCentral()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

repositories {
google()
maven {
url "maven.google.com"
}
jcenter()
mavenCentral()
flatDir {
dirs 'embylib'
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
}

compileSdkVersion 28
buildToolsVersion '28.0.2'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

implementation project(':serenity-common')
implementation project(':serenity-android-common')

implementation "com.birbit:android-priority-jobqueue:$androidPriorityJobQueueVersion"
implementation "com.squareup.dagger:dagger:$daggerVersion"
kapt "com.squareup.dagger:dagger-compiler:$daggerVersion"
implementation "org.greenrobot:eventbus:$eventBus"
implementation "com.squareup.moshi:moshi-kotlin:$moshiKotlinVersion"
implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion"
implementation "net.danlew:android.joda:$jodaTimeVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"
implementation "me.jessyan:retrofit-url-manager:$urlManager"
implementation "com.jakewharton.timber:timber:$timberVersion"
implementation "com.github.nisrulz:easydeviceinfo-base:2.4.1"
implementation "com.github.nisrulz:easydeviceinfo-common:2.4.1"

testImplementation "junit:junit:$junitVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
kaptTest "com.squareup.dagger:dagger-compiler:$daggerVersion"
testImplementation("org.robolectric:robolectric:$robolectricVersion") {
exclude module: 'support-v4'
}
testImplementation "org.robolectric:shadows-supportv4:$robolectricVersion"
testImplementation "org.robolectric:shadows-framework:$robolectricVersion"
testImplementation "org.robolectric:shadowapi:$robolectricVersion"
testImplementation "org.robolectric:shadows-playservices:$robolectricVersion"
testImplementation "org.khronos:opengl-api:$openglApiVersion"
}

sourceCompatibility = "1.8"
targetCompatibility = "1.7"

7 changes: 7 additions & 0 deletions emby-lib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="us.nineworlds.serenity.emby"
android:versionCode="1"
android:versionName="1.0">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package us.nineworlds.serenity.emby.model;

import us.nineworlds.serenity.common.media.model.ICrew;

public abstract class AbstractCrew implements ICrew {

private String tag;

@Override public String getTag() {
return tag;
}

@Override public void setTag(String tag) {
this.tag = tag;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package us.nineworlds.serenity.emby.model;

import us.nineworlds.serenity.common.media.model.ClientObject;

public abstract class AbstractEmbyObject implements ClientObject {

private String key;

@Override public String getKey() {
return key;
}

@Override public void setKey(String key) {
this.key = key;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package us.nineworlds.serenity.emby.model;

import us.nineworlds.serenity.common.media.model.ICountry;

public class Country extends AbstractCrew implements ICountry {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package us.nineworlds.serenity.emby.model;

import us.nineworlds.serenity.common.media.model.IDirector;

public class Director extends AbstractCrew implements IDirector {

}
Loading

0 comments on commit ba480ea

Please sign in to comment.