diff --git a/README.md b/README.md index 6f11ed3..751ff86 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **ARVI** will enable you to make your feeds more interactive and appealing to your end users without the need to spend a lot of your valuable time on the implementation. -[ ![Download](https://api.bintray.com/packages/arthurimsacc/maven/arvi/images/download.svg) ](https://bintray.com/arthurimsacc/maven/arvi/_latestVersion) +[ ![Download](https://img.shields.io/maven-central/v/com.arthurivanets.arvi/arvi.svg?label=Download) ](https://mvnrepository.com/search?q=com.arthurivanets.arvi) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Platform](https://img.shields.io/badge/platform-Android-green.svg)](http://developer.android.com/index.html) ![](https://img.shields.io/badge/API-21%2B-green.svg?style=flat) @@ -98,7 +98,7 @@ ARVI is comprised of several library modules, namely: * `arvi-utils` - common utils and helpers (Optional) The basic implementation would have to include the core module -> ***Latest version:*** [ ![Download](https://api.bintray.com/packages/arthurimsacc/maven/arvi/images/download.svg) ](https://bintray.com/arthurimsacc/maven/arvi/_latestVersion) +> ***Latest version:*** [ ![Download](https://img.shields.io/maven-central/v/com.arthurivanets.arvi/arvi.svg?label=Download) ](https://mvnrepository.com/search?q=com.arthurivanets.arvi) `implementation "com.arthurivanets.arvi:arvi:X.Y.Z"` @@ -373,7 +373,7 @@ For more advanced use cases [Adapster](https://github.com/arthur3486/adapster)-based implementation requires both the official [Adapster](https://github.com/arthur3486/adapster) and `arvi-adapster` module dependencies. -> ***Latest ARVI version:*** [ ![Download](https://api.bintray.com/packages/arthurimsacc/maven/arvi/images/download.svg) ](https://bintray.com/arthurimsacc/maven/arvi/_latestVersion) +> ***Latest ARVI version:*** [ ![Download](https://img.shields.io/maven-central/v/com.arthurivanets.arvi/arvi.svg?label=Download) ](https://mvnrepository.com/search?q=com.arthurivanets.arvi) `implementation "com.arthurivanets.arvi:arvi-adapster:X.Y.Z"` @@ -678,7 +678,7 @@ See the [CONTRIBUTING.md](CONTRIBUTING.md) file. -> Using ARVI in your app and want it to get listed here? Email me at arthur.ivanets.l@gmail.com! +> Using ARVI in your app and want it to get listed here? Email me at arthur.ivanets.work@gmail.com! ## License diff --git a/arvi-adapster/build.gradle b/arvi-adapster/build.gradle index 307fc3a..7b8a657 100644 --- a/arvi-adapster/build.gradle +++ b/arvi-adapster/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion rootProject.minSdk targetSdkVersion rootProject.targetSdk - versionCode rootProject.releaseVersionCode - versionName rootProject.releaseVersion testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -53,10 +51,10 @@ dependencies { } ext { - releaseArtifact = "arvi-adapster" - releaseDescription = "" + PUBLISH_GROUP_ID = "com.arthurivanets.arvi" + PUBLISH_ARTIFACT_ID = "arvi-adapster" + PUBLISH_VERSION = "1.3.0" + PUBLISH_ARTIFACT_DESCRIPTION = libraryDescription } -project.archivesBaseName = "arvi-adapster" - apply from: "../gradle/script/publish.gradle" \ No newline at end of file diff --git a/arvi-adapster/src/main/java/com/arthurivanets/arvi/adapster/AdapsterPlayableItemViewHolder.java b/arvi-adapster/src/main/java/com/arthurivanets/arvi/adapster/AdapsterPlayableItemViewHolder.java index 5f6eeea..f131f36 100644 --- a/arvi-adapster/src/main/java/com/arthurivanets/arvi/adapster/AdapsterPlayableItemViewHolder.java +++ b/arvi-adapster/src/main/java/com/arthurivanets/arvi/adapster/AdapsterPlayableItemViewHolder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi-ktx/build.gradle b/arvi-ktx/build.gradle index 94920d9..d1c0abd 100644 --- a/arvi-ktx/build.gradle +++ b/arvi-ktx/build.gradle @@ -10,8 +10,6 @@ android { defaultConfig { minSdkVersion rootProject.minSdk targetSdkVersion rootProject.targetSdk - versionCode rootProject.releaseVersionCode - versionName rootProject.releaseVersion testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -51,11 +49,10 @@ dependencies { } ext { - releaseArtifact = "arvi-ktx" - releaseDescription = "" + PUBLISH_GROUP_ID = "com.arthurivanets.arvi" + PUBLISH_ARTIFACT_ID = "arvi-ktx" + PUBLISH_VERSION = "1.3.0" + PUBLISH_ARTIFACT_DESCRIPTION = libraryDescription } -project.archivesBaseName = "arvi-ktx" - -apply from: "../common/constants.gradle" apply from: '../gradle/script/publish.gradle' diff --git a/arvi-ktx/src/main/java/com/arthurivanets/arvi/ktx/ArviExtensions.kt b/arvi-ktx/src/main/java/com/arthurivanets/arvi/ktx/ArviExtensions.kt index dfc0559..7887679 100644 --- a/arvi-ktx/src/main/java/com/arthurivanets/arvi/ktx/ArviExtensions.kt +++ b/arvi-ktx/src/main/java/com/arthurivanets/arvi/ktx/ArviExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi-utils/build.gradle b/arvi-utils/build.gradle index 6aa9aab..a5d0392 100644 --- a/arvi-utils/build.gradle +++ b/arvi-utils/build.gradle @@ -6,8 +6,6 @@ android { defaultConfig { minSdkVersion rootProject.minSdk targetSdkVersion rootProject.targetSdk - versionCode rootProject.releaseVersionCode - versionName rootProject.releaseVersion testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -41,11 +39,10 @@ dependencies { } ext { - releaseArtifact = "arvi-utils" - releaseDescription = "" + PUBLISH_GROUP_ID = "com.arthurivanets.arvi" + PUBLISH_ARTIFACT_ID = "arvi-utils" + PUBLISH_VERSION = "1.3.0" + PUBLISH_ARTIFACT_DESCRIPTION = libraryDescription } -project.archivesBaseName = "arvi-utils" - -apply from: "../common/constants.gradle" -apply from: '../gradle/script/publish.gradle' +apply from: '../gradle/script/publish.gradle' \ No newline at end of file diff --git a/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/HasPreCachingSupport.java b/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/HasPreCachingSupport.java index e36ee3b..be15f88 100644 --- a/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/HasPreCachingSupport.java +++ b/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/HasPreCachingSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheGridLayoutManager.java b/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheGridLayoutManager.java index 0bb4747..6f25768 100644 --- a/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheGridLayoutManager.java +++ b/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheGridLayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheLinearLayoutManager.java b/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheLinearLayoutManager.java index 8d24c75..6213dfb 100644 --- a/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheLinearLayoutManager.java +++ b/arvi-utils/src/main/java/com/arthurivanets/arvi/utils/recyclerview/PreCacheLinearLayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/build.gradle b/arvi/build.gradle index 05d2a76..d3aa5a6 100644 --- a/arvi/build.gradle +++ b/arvi/build.gradle @@ -6,8 +6,6 @@ android { defaultConfig { minSdkVersion rootProject.minSdk targetSdkVersion rootProject.targetSdk - versionCode rootProject.releaseVersionCode - versionName rootProject.releaseVersion testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -48,11 +46,10 @@ dependencies { } ext { - releaseArtifact = "arvi" - releaseDescription = "" + PUBLISH_GROUP_ID = "com.arthurivanets.arvi" + PUBLISH_ARTIFACT_ID = "arvi" + PUBLISH_VERSION = "1.3.0" + PUBLISH_ARTIFACT_DESCRIPTION = libraryDescription } -project.archivesBaseName = "arvi" - -apply from: "../common/constants.gradle" -apply from: '../gradle/script/publish.gradle' +apply from: '../gradle/script/publish.gradle' \ No newline at end of file diff --git a/arvi/src/main/java/com/arthurivanets/arvi/ArviPlayerNodePool.java b/arvi/src/main/java/com/arthurivanets/arvi/ArviPlayerNodePool.java index 682b4f9..6a5bc27 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/ArviPlayerNodePool.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/ArviPlayerNodePool.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/ArviPlugins.java b/arvi/src/main/java/com/arthurivanets/arvi/ArviPlugins.java index 72102df..f0620f3 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/ArviPlugins.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/ArviPlugins.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/Config.java b/arvi/src/main/java/com/arthurivanets/arvi/Config.java index 2269343..923c7ac 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/Config.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/Config.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,10 @@ import com.google.android.exoplayer2.DefaultLoadControl; import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.LoadControl; -import com.google.android.exoplayer2.drm.DrmSessionManager; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; import com.google.android.exoplayer2.upstream.cache.Cache; -import java.util.Arrays; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -45,7 +42,6 @@ public final class Config { @NonNull public final BaseMeter meter; @NonNull public final LoadControl loadControl; @NonNull public final MediaSourceBuilder mediaSourceBuilder; - @NonNull public final DrmSessionManager[] drmSessionManagers; @Nullable public final Cache cache; @Nullable public final DataSource.Factory dataSourceFactory; @@ -58,7 +54,6 @@ private Config(Builder builder) { this.meter = builder.meter; this.loadControl = builder.loadControl; this.mediaSourceBuilder = builder.mediaSourceBuilder; - this.drmSessionManagers = builder.drmSessionManagers; this.cache = builder.cache; this.dataSourceFactory = builder.dataSourceFactory; } @@ -86,16 +81,6 @@ public final boolean hasDataSourceFactory() { - /** - * Determines if the {@link DrmSessionManager}s are set. - */ - public final boolean hasDrmSessionManagers() { - return (this.drmSessionManagers.length > 0); - } - - - - @Override public final int hashCode() { final int prime = 31; @@ -106,7 +91,6 @@ public final int hashCode() { result = ((prime * result) + this.mediaSourceBuilder.hashCode()); result = ((prime * result) + (hasCache() ? this.cache.hashCode() : 0)); result = ((prime * result) + (hasDataSourceFactory() ? this.dataSourceFactory.hashCode() : 0)); - result = ((prime * result) + (hasDrmSessionManagers() ? Arrays.hashCode(this.drmSessionManagers) : 0)); return result; } @@ -131,7 +115,6 @@ public static final class Builder { private BaseMeter meter; private LoadControl loadControl; private MediaSourceBuilder mediaSourceBuilder; - private DrmSessionManager[] drmSessionManagers; private Cache cache; private DataSource.Factory dataSourceFactory; @@ -142,7 +125,6 @@ public Builder() { this.meter = new BaseMeter<>(bandwidthMeter, bandwidthMeter); this.loadControl = new DefaultLoadControl(); this.mediaSourceBuilder = MediaSourceBuilder.DEFAULT; - this.drmSessionManagers = new DrmSessionManager[0]; this.cache = null; this.dataSourceFactory = null; } @@ -177,12 +159,6 @@ public Builder looping(boolean isLooping) { } - public Builder drmSessionManagers(@NonNull DrmSessionManager[] drmSessionManagers) { - this.drmSessionManagers = checkNonNull(drmSessionManagers); - return this; - } - - public Builder cache(@Nullable Cache cache) { this.cache = cache; return this; diff --git a/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerCreatorFactory.java b/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerCreatorFactory.java index 4bac639..f20f74e 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerCreatorFactory.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerCreatorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerNodePoolFactory.java b/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerNodePoolFactory.java index a9551bf..689516f 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerNodePoolFactory.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/DefaultPlayerNodePoolFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/PlayerCreatorFactory.java b/arvi/src/main/java/com/arthurivanets/arvi/PlayerCreatorFactory.java index 54147ef..6b0807c 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/PlayerCreatorFactory.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/PlayerCreatorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/PlayerNode.java b/arvi/src/main/java/com/arthurivanets/arvi/PlayerNode.java index b1bb62b..6f1f1d1 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/PlayerNode.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/PlayerNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePool.java b/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePool.java index a00a85c..9e477b6 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePool.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePool.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePoolFactory.java b/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePoolFactory.java index 757303c..3d4310c 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePoolFactory.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/PlayerNodePoolFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/PlayerProvider.java b/arvi/src/main/java/com/arthurivanets/arvi/PlayerProvider.java index 3a40618..916ad04 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/PlayerProvider.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/PlayerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/PlayerProviderImpl.java b/arvi/src/main/java/com/arthurivanets/arvi/PlayerProviderImpl.java index bca3146..8f56d55 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/PlayerProviderImpl.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/PlayerProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/model/PlaybackInfo.java b/arvi/src/main/java/com/arthurivanets/arvi/model/PlaybackInfo.java index 80d5f5f..ae41c7d 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/model/PlaybackInfo.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/model/PlaybackInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/model/VolumeInfo.java b/arvi/src/main/java/com/arthurivanets/arvi/model/VolumeInfo.java index 243777d..314cfec 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/model/VolumeInfo.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/model/VolumeInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/DefaultPlayer.java b/arvi/src/main/java/com/arthurivanets/arvi/player/DefaultPlayer.java index 7f08e74..3f7ccc6 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/DefaultPlayer.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/DefaultPlayer.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,9 @@ import com.arthurivanets.arvi.player.util.VolumeController; import com.arthurivanets.arvi.util.misc.ExoPlayerUtils; import com.arthurivanets.arvi.util.misc.Preconditions; -import com.google.android.exoplayer2.ExoPlayerFactory; import com.google.android.exoplayer2.LoadControl; import com.google.android.exoplayer2.RenderersFactory; import com.google.android.exoplayer2.SimpleExoPlayer; -import com.google.android.exoplayer2.drm.DrmSessionManager; -import com.google.android.exoplayer2.drm.FrameworkMediaCrypto; import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.trackselection.TrackSelector; import com.google.android.exoplayer2.ui.PlayerView; @@ -54,7 +51,6 @@ public class DefaultPlayer implements Player { private TrackSelector trackSelector; private LoadControl loadControl; private BandwidthMeter bandwidthMeter; - private DrmSessionManager drmSessionManager; private MediaSource mediaSource; private SimpleExoPlayer exoPlayer; @@ -86,32 +82,12 @@ public DefaultPlayer(@NonNull Context context, @NonNull TrackSelector trackSelector, @NonNull LoadControl loadControl, @Nullable BandwidthMeter bandwidthMeter) { - this( - context, - renderersFactory, - trackSelector, - loadControl, - bandwidthMeter, - null - ); - } - - - - - public DefaultPlayer(@NonNull Context context, - @NonNull RenderersFactory renderersFactory, - @NonNull TrackSelector trackSelector, - @NonNull LoadControl loadControl, - @Nullable BandwidthMeter bandwidthMeter, - @Nullable DrmSessionManager drmSessionManager) { this.context = checkNonNull(context).getApplicationContext(); this.eventHandler = new PlayerEventListenerRegistry(); this.renderersFactory = checkNonNull(renderersFactory); this.trackSelector = checkNonNull(trackSelector); this.loadControl = checkNonNull(loadControl); this.bandwidthMeter = bandwidthMeter; - this.drmSessionManager = drmSessionManager; } @@ -123,15 +99,12 @@ public final void init() { return; } - // initializing the actual ExoPlayer - this.exoPlayer = ExoPlayerFactory.newSimpleInstance( - this.context, - this.renderersFactory, - this.trackSelector, - this.loadControl, - this.drmSessionManager, - this.bandwidthMeter - ); + this.exoPlayer = new SimpleExoPlayer.Builder(this.context, this.renderersFactory) + .setTrackSelector(this.trackSelector) + .setLoadControl(this.loadControl) + .setBandwidthMeter(this.bandwidthMeter) + .build(); + this.exoPlayer.addListener(this.eventHandler); this.volumeController = new DefaultVolumeController(this.exoPlayer); } @@ -144,11 +117,8 @@ public final void prepare(final boolean resetPosition) { checkPlayerState(); checkMediaSource(); - this.exoPlayer.prepare( - this.mediaSource, - resetPosition, - false - ); + this.exoPlayer.setMediaSource(this.mediaSource, resetPosition); + this.exoPlayer.prepare(); } diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/Player.java b/arvi/src/main/java/com/arthurivanets/arvi/player/Player.java index 097d369..7b1b93d 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/Player.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/Player.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/creators/DefaultPlayerCreator.java b/arvi/src/main/java/com/arthurivanets/arvi/player/creators/DefaultPlayerCreator.java index db504b5..8797519 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/creators/DefaultPlayerCreator.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/creators/DefaultPlayerCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,10 @@ import com.arthurivanets.arvi.player.DefaultPlayer; import com.arthurivanets.arvi.player.Player; import com.arthurivanets.arvi.player.util.MediaSourceBuilder; -import com.arthurivanets.arvi.player.util.MultiDrmRendererFactory; -import com.arthurivanets.arvi.util.misc.CollectionUtils; import com.arthurivanets.arvi.util.misc.Preconditions; +import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.LoadControl; import com.google.android.exoplayer2.RenderersFactory; -import com.google.android.exoplayer2.drm.DrmSessionManager; import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelector; @@ -39,8 +37,6 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory; import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory; -import java.util.Arrays; - import androidx.annotation.NonNull; import static com.arthurivanets.arvi.util.misc.Preconditions.checkNonNull; @@ -62,7 +58,6 @@ public final class DefaultPlayerCreator implements PlayerCreator { private final RenderersFactory renderersFactory; private final DataSource.Factory mediaDataSourceFactory; private final DataSource.Factory manifestDataSourceFactory; - private final DrmSessionManager[] drmSessionManagers; @@ -72,18 +67,13 @@ public DefaultPlayerCreator(@NonNull PlayerProvider playerProvider, @NonNull Con Preconditions.nonNull(config); this.playerProvider = checkNonNull(playerProvider); - this.trackSelector = new DefaultTrackSelector(); + this.trackSelector = new DefaultTrackSelector(playerProvider.getContext()); this.loadControl = config.loadControl; this.bandwidthMeter = config.meter; this.mediaSourceBuilder = config.mediaSourceBuilder; - this.renderersFactory = new MultiDrmRendererFactory( - playerProvider.getContext(), - config.drmSessionManagers, - config.extensionMode - ); + this.renderersFactory = new DefaultRenderersFactory(playerProvider.getContext()); this.mediaDataSourceFactory = createDataSourceFactory(playerProvider, config); this.manifestDataSourceFactory = new DefaultDataSourceFactory(playerProvider.getContext(), playerProvider.getLibraryName()); - this.drmSessionManagers = config.drmSessionManagers; } @@ -121,8 +111,7 @@ public final Player createPlayer() { this.renderersFactory, this.trackSelector, this.loadControl, - this.bandwidthMeter, - CollectionUtils.takeFirstOrNull(this.drmSessionManagers) + this.bandwidthMeter ); } @@ -169,7 +158,6 @@ public final int hashCode() { result = ((prime * result) + this.renderersFactory.hashCode()); result = ((prime * result) + this.mediaDataSourceFactory.hashCode()); result = ((prime * result) + this.manifestDataSourceFactory.hashCode()); - result = ((prime * result) + Arrays.hashCode(this.drmSessionManagers)); return result; } diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/creators/PlayerCreator.java b/arvi/src/main/java/com/arthurivanets/arvi/player/creators/PlayerCreator.java index 5daa66a..55e227c 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/creators/PlayerCreator.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/creators/PlayerCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSource.java b/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSource.java index 0c35ad9..92cb2f1 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSource.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ import com.arthurivanets.arvi.player.util.HttpHeaders; import com.google.android.exoplayer2.upstream.DataSpec; import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; -import com.google.android.exoplayer2.util.Predicate; /** * An implementation of the {@link DefaultHttpDataSource} with a support @@ -33,20 +32,18 @@ public class ArviHttpDataSource extends DefaultHttpDataSource { - public ArviHttpDataSource(String userAgent, Predicate contentTypePredicate) { - super(userAgent, contentTypePredicate); + public ArviHttpDataSource(String userAgent) { + super(userAgent); } public ArviHttpDataSource(String userAgent, - Predicate contentTypePredicate, int connectTimeoutMillis, int readTimeoutMillis) { super( userAgent, - contentTypePredicate, connectTimeoutMillis, readTimeoutMillis ); @@ -56,14 +53,12 @@ public ArviHttpDataSource(String userAgent, public ArviHttpDataSource(String userAgent, - Predicate contentTypePredicate, int connectTimeoutMillis, int readTimeoutMillis, boolean allowCrossProtocolRedirects, RequestProperties defaultRequestProperties) { super( userAgent, - contentTypePredicate, connectTimeoutMillis, readTimeoutMillis, allowCrossProtocolRedirects, diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSourceFactory.java b/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSourceFactory.java index 681aa95..f0d84d4 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSourceFactory.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/ArviHttpDataSourceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -174,7 +174,6 @@ protected DefaultHttpDataSource createDataSourceInternal(HttpDataSource.RequestP final DefaultHttpDataSource dataSource = new ArviHttpDataSource( this.userAgent, - null, this.connectTimeoutMillis, this.readTimeoutMillis, this.allowCrossProtocolRedirects, diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/RequestAuthorizer.java b/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/RequestAuthorizer.java index 2d9f90f..79f0b9e 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/RequestAuthorizer.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/datasource/RequestAuthorizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/BaseMeter.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/BaseMeter.java index bf2f2b4..af33965 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/BaseMeter.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/util/BaseMeter.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/DefaultVolumeController.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/DefaultVolumeController.java index df0d74c..22c9a47 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/DefaultVolumeController.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/util/DefaultVolumeController.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/HttpHeaders.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/HttpHeaders.java index 392762a..f430ab7 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/HttpHeaders.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/util/HttpHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/MediaSourceBuilder.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/MediaSourceBuilder.java index f941657..1681f8c 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/MediaSourceBuilder.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/util/MediaSourceBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/MultiDrmRendererFactory.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/MultiDrmRendererFactory.java deleted file mode 100644 index 22de0bd..0000000 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/MultiDrmRendererFactory.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.arthurivanets.arvi.player.util; - -import android.content.Context; -import android.os.Handler; - -import com.arthurivanets.arvi.util.misc.CollectionUtils; -import com.google.android.exoplayer2.DefaultRenderersFactory; -import com.google.android.exoplayer2.Renderer; -import com.google.android.exoplayer2.audio.AudioProcessor; -import com.google.android.exoplayer2.audio.AudioRendererEventListener; -import com.google.android.exoplayer2.drm.DrmSessionManager; -import com.google.android.exoplayer2.drm.FrameworkMediaCrypto; -import com.google.android.exoplayer2.mediacodec.MediaCodecSelector; -import com.google.android.exoplayer2.video.VideoRendererEventListener; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -/** - * An implementation of the {@link DefaultRenderersFactory} that takes into account the Digital Rights Management. - */ -public class MultiDrmRendererFactory extends DefaultRenderersFactory { - - - private final List> drmSessionManagers; - - - - - public MultiDrmRendererFactory(@NonNull Context context, - @Nullable DrmSessionManager[] managers, - @ExtensionRendererMode int extensionRendererMode) { - super(context); - - setExtensionRendererMode(extensionRendererMode); - - if((managers != null) && (managers.length > 1)) { - this.drmSessionManagers = CollectionUtils.toListUnchecked(managers); - } else { - this.drmSessionManagers = new ArrayList<>(); - } - } - - - - - @Override - protected void buildVideoRenderers(Context context, - int extensionRendererMode, - MediaCodecSelector mediaCodecSelector, - @Nullable DrmSessionManager drmSessionManager, - boolean playClearSamplesWithoutKeys, - boolean enableDecoderFallback, - Handler eventHandler, - VideoRendererEventListener eventListener, - long allowedVideoJoiningTimeMs, - ArrayList out) { - final ArrayList localOut = new ArrayList<>(); - - super.buildVideoRenderers( - context, - extensionRendererMode, - mediaCodecSelector, - drmSessionManager, - playClearSamplesWithoutKeys, - enableDecoderFallback, - eventHandler, - eventListener, - allowedVideoJoiningTimeMs, - localOut - ); - - final Set outSet = new HashSet<>(localOut); - - if(!this.drmSessionManagers.isEmpty()) { - localOut.clear(); - - for(DrmSessionManager manager : this.drmSessionManagers) { - super.buildVideoRenderers( - context, - EXTENSION_RENDERER_MODE_OFF, - mediaCodecSelector, - manager, - playClearSamplesWithoutKeys, - enableDecoderFallback, - eventHandler, - eventListener, - allowedVideoJoiningTimeMs, - localOut - ); - } - - outSet.addAll(localOut); - } - - out.addAll(outSet); - } - - - - - @Override - protected void buildAudioRenderers(Context context, - int extensionRendererMode, - MediaCodecSelector mediaCodecSelector, - @Nullable DrmSessionManager drmSessionManager, - boolean playClearSamplesWithoutKeys, - boolean enableDecoderFallback, - AudioProcessor[] audioProcessors, - Handler eventHandler, - AudioRendererEventListener eventListener, - ArrayList out) { - final ArrayList localOut = new ArrayList<>(); - - super.buildAudioRenderers( - context, - extensionRendererMode, - mediaCodecSelector, - drmSessionManager, - playClearSamplesWithoutKeys, - enableDecoderFallback, - audioProcessors, - eventHandler, - eventListener, - localOut - ); - - final Set outSet = new HashSet<>(localOut); - - if(!this.drmSessionManagers.isEmpty()) { - localOut.clear(); - - for(DrmSessionManager manager : this.drmSessionManagers) { - super.buildAudioRenderers( - context, - EXTENSION_RENDERER_MODE_OFF, - mediaCodecSelector, - manager, - playClearSamplesWithoutKeys, - enableDecoderFallback, - audioProcessors, - eventHandler, - eventListener, - localOut - ); - } - - outSet.addAll(localOut); - } - - out.addAll(outSet); - } - - - - -} \ No newline at end of file diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/PlayerEventListenerRegistry.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/PlayerEventListenerRegistry.java index 29e3159..a60aa58 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/PlayerEventListenerRegistry.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/util/PlayerEventListenerRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/player/util/VolumeController.java b/arvi/src/main/java/com/arthurivanets/arvi/player/util/VolumeController.java index 1e13ddd..d588d9e 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/player/util/VolumeController.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/player/util/VolumeController.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/Cache.java b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/Cache.java index c276586..56252b2 100755 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/Cache.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/Cache.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/CacheType.java b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/CacheType.java index 473045b..78a58d5 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/CacheType.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/CacheType.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/ConcurrentCache.java b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/ConcurrentCache.java index 2e4086c..97243bd 100755 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/ConcurrentCache.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/ConcurrentCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/InMemoryCache.java b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/InMemoryCache.java index 6b1672f..3be3f69 100755 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/InMemoryCache.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/InMemoryCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/PlaybackInfoCache.java b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/PlaybackInfoCache.java index 4525185..3cd5442 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/cache/PlaybackInfoCache.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/cache/PlaybackInfoCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/misc/CollectionUtils.java b/arvi/src/main/java/com/arthurivanets/arvi/util/misc/CollectionUtils.java index 869b3b8..8753ac3 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/misc/CollectionUtils.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/misc/CollectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/misc/ExoPlayerUtils.java b/arvi/src/main/java/com/arthurivanets/arvi/util/misc/ExoPlayerUtils.java index 99b1c0b..797c2fc 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/misc/ExoPlayerUtils.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/misc/ExoPlayerUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/util/misc/Preconditions.java b/arvi/src/main/java/com/arthurivanets/arvi/util/misc/Preconditions.java index 3307a80..07e7d49 100755 --- a/arvi/src/main/java/com/arthurivanets/arvi/util/misc/Preconditions.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/util/misc/Preconditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayabilityStateChangeObserver.java b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayabilityStateChangeObserver.java index d47169b..de8b65a 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayabilityStateChangeObserver.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayabilityStateChangeObserver.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/widget/Playable.java b/arvi/src/main/java/com/arthurivanets/arvi/widget/Playable.java index 811cea4..f0d72dd 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/widget/Playable.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/widget/Playable.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemViewHolder.java b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemViewHolder.java index 9d77930..62f5ec4 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemViewHolder.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemViewHolder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsContainer.java b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsContainer.java index 706dcf8..f3da960 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsContainer.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsRecyclerView.java b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsRecyclerView.java index 1274764..eb36013 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsRecyclerView.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlayableItemsRecyclerView.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlaybackState.java b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlaybackState.java index 825b7c4..de80903 100644 --- a/arvi/src/main/java/com/arthurivanets/arvi/widget/PlaybackState.java +++ b/arvi/src/main/java/com/arthurivanets/arvi/widget/PlaybackState.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/build.gradle b/build.gradle index 1efb5ae..4e55346 100644 --- a/build.gradle +++ b/build.gradle @@ -1,54 +1,31 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. apply plugin: "com.github.ben-manes.versions" -apply from: "common/constants.gradle" buildscript { - ext.kotlin_version = "1.3.50" + ext.kotlin_version = "1.5.20" repositories { - google() jcenter() + mavenCentral() + google() + gradlePluginPortal() } dependencies { - classpath "com.android.tools.build:gradle:3.5.0" + classpath "com.android.tools.build:gradle:7.0.4" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4" - classpath "com.github.dcendents:android-maven-gradle-plugin:2.1" - classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4" - classpath "com.github.ben-manes:gradle-versions-plugin:0.22.0" + classpath "com.github.ben-manes:gradle-versions-plugin:0.41.0" } } allprojects { + apply plugin: "com.github.ben-manes.versions" + apply from: "${rootDir}/common/constants.gradle" + repositories { - google() jcenter() - maven { url "https://oss.sonatype.org/content/repositories/snapshots" } - maven { url "https://google.bintray.com/exoplayer/" } - } - - project.ext { - releaseRepoName = rootProject.releaseRepoName - releaseUserOrg = rootProject.releaseUserOrg - releaseGroupId = rootProject.releaseGroupId - releaseVersion = rootProject.releaseVersion - releaseVersionCode = rootProject.releaseVersionCode - releaseWebsite = rootProject.releaseWebsite - releaseLicense = rootProject.releaseLicense - - licenseName = rootProject.licenseName - licenseUrl = rootProject.licenseUrl - allLicenses = rootProject.allLicenses - - developerId = rootProject.developerId - developerName = rootProject.developerName - developerEmail = rootProject.developerEmail - - siteUrl = rootProject.siteUrl - gitUrl = rootProject.gitUrl - issueTracker = rootProject.issueTracker - releaseNotesFile = rootProject.releaseNotesFile + mavenCentral() + google() } } diff --git a/common/constants.gradle b/common/constants.gradle index dc0db49..ae2f266 100644 --- a/common/constants.gradle +++ b/common/constants.gradle @@ -1,20 +1,20 @@ project.ext { - compileSdk = 29 - targetSdk = 29 - minSdk = 18 + compileSdk = 31 + targetSdk = 31 + minSdk = 21 - supportLibraryVersion = "1.1.0" - coreKtxVersion = "1.1.0" - materialDesignComponentsVersion = "1.0.0" + supportLibraryVersion = "1.4.1" + coreKtxVersion = "1.7.0" + materialDesignComponentsVersion = "1.5.0" robolectricVersion = "4.0-alpha-3-SNAPSHOT" - jUnitVersion = "4.12" - testRunnerVersion = "1.2.0" - espressoVersion = "3.2.0" - recyclerViewVersion = "1.0.0" - constraintLayoutVersion = "1.1.3" - exoPlayerVersion = "2.10.4" + jUnitVersion = "4.13.2" + testRunnerVersion = "1.4.0" + espressoVersion = "3.4.0" + recyclerViewVersion = "1.2.1" + constraintLayoutVersion = "2.1.3" + exoPlayerVersion = "2.13.3" adapsterVersion = "1.0.12" releaseRepoName = "maven" @@ -26,15 +26,22 @@ project.ext { releaseLicense = ["Apache-2.0"] licenseName = "The Apache Software License, Version 2.0" - licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt" + licenseUrl = "https://github.com/arthur3486/ARVI/blob/master/LICENSE" allLicenses = ["Apache-2.0"] developerId = "arthur3486" developerName = "Arthur Ivanets" - developerEmail = "arthur.ivanets.l@gmail.com" + developerEmail = "arthur.ivanets.work@gmail.com" + + libraryDescription = "ExoPlayer-based Android library that makes the implementation of the autoplayable RecyclerView video items an easy task" + + publishingHostRepoName = "sonatype" + publishingHostRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" siteUrl = "https://github.com/arthur3486/ARVI" gitUrl = "https://github.com/arthur3486/ARVI.git" issueTracker = "https://github.com/arthur3486/ARVI/issues" + scmConnection = "scm:git:github.com/arthur3486/ARVI.git" + scmDeveloperConnection = "scm:git:ssh://github.com/arthur3486/ARVI.git" releaseNotesFile = "CHANGELOG.md" } \ No newline at end of file diff --git a/gradle/script/publish.gradle b/gradle/script/publish.gradle index e3a1dd6..3885a12 100644 --- a/gradle/script/publish.gradle +++ b/gradle/script/publish.gradle @@ -1,169 +1,90 @@ -import java.util.zip.ZipFile - apply plugin: "maven-publish" -apply plugin: "com.github.dcendents.android-maven" -apply plugin: "com.jfrog.bintray" - +apply plugin: "signing" +apply from: "${rootDir}/common/constants.gradle" -group = releaseGroupId -version = releaseVersion +group = PUBLISH_GROUP_ID +version = PUBLISH_VERSION task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs -} - -publishing { - publications { - aar(MavenPublication) { - groupId = releaseGroupId - artifactId = releaseArtifact - version = releaseVersion - - // Tell maven to prepare the generated "*.aar" file for publishing - artifact(androidSourcesJar) - artifact("$buildDir/outputs/aar/${project.archivesBaseName}-release.aar") - } + archiveClassifier.set("sources") + + if (project.plugins.findPlugin("com.android.library")) { + from android.sourceSets.main.java.srcDirs + from android.sourceSets.main.kotlin.srcDirs + } else { + from sourceSets.main.java.srcDirs + from sourceSets.main.kotlin.srcDirs } } -install { - repositories.mavenInstaller { - pom.project { - packaging "aar" - groupId releaseGroupId - artifactId releaseArtifact - - name releaseArtifact - description releaseDescription - url releaseWebsite +artifacts { + archives androidSourcesJar +} - licenses { - license { - name licenseName - url licenseUrl +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + groupId PUBLISH_GROUP_ID + artifactId PUBLISH_ARTIFACT_ID + version PUBLISH_VERSION + + if (project.plugins.findPlugin("com.android.library")) { + from components.release + } else { + from components.java } - } - developers { - developer { - id developerId - name developerName - email developerEmail + artifact androidSourcesJar + + pom { + name = PUBLISH_ARTIFACT_ID + description = PUBLISH_ARTIFACT_DESCRIPTION + url = releaseWebsite + + licenses { + license { + name = licenseName + url = licenseUrl + } + } + + developers { + developer { + id = developerId + name = developerName + email = developerEmail + } + } + + scm { + connection = scmConnection + developerConnection = scmDeveloperConnection + url = siteUrl + } } } - - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - } } - } -} - -task sourcesJar(type: Jar) { - classifier = "sources" - from android.sourceSets.main.java.srcDirs -} - -// a temporary replacement -task javadoc(type: Javadoc) { - failOnError false - source = android.sourceSets.main.java.srcDirs - // Also add the generated R class to avoid errors... - // TODO: debug is hard-coded - source += "$buildDir/generated/source/r/debug/" - // ... but exclude the R classes from the docs - excludes += "**/R.java" - - // TODO: "compile" is deprecated in Gradle 4.1, - // but "implementation" and "api" are not resolvable :( - classpath += configurations.compile - afterEvaluate { - // Wait after evaluation to add the android classpath - // to avoid "buildToolsVersion is not specified" error - classpath += files(android.getBootClasspath()) + repositories { + maven { + name = publishingHostRepoName + url = uri(publishingHostRepoUrl) - // Process AAR dependencies - def aarDependencies = classpath.filter { it.name.endsWith('.aar') } - classpath -= aarDependencies - aarDependencies.each { aar -> - System.out.println("Adding classpath for aar: " + aar.name) - // Extract classes.jar from the AAR dependency, and add it to the javadoc classpath - def outputPath = "$buildDir/tmp/exploded-aar/${aar.name.replace('.aar', '.jar')}" - classpath += files(outputPath) - - // Use a task so the actual extraction only happens before the javadoc task is run - dependsOn task(name: "extract ${aar.name}").doLast { - extractZipEntry(aar, 'classes.jar', outputPath) + credentials { + username = getPropertyOrDefault("SONATYPE_NEXUS_USERNAME", System.getenv("SONATYPE_NEXUS_USERNAME")) + password = getPropertyOrDefault("SONATYPE_NEXUS_PASSWORD", System.getenv("SONATYPE_NEXUS_PASSWORD")) + } } } } -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = "javadoc" - from javadoc.destinationDir -} - -artifacts { - archives javadocJar - archives sourcesJar -} - -bintray { - user = propertyOrDefault("bintrayUser") - key = propertyOrDefault("bintrayApiKey") - - configurations = ["archives"] - - pkg { - repo = releaseRepoName - //userOrg = releaseUserOrg - name = releaseArtifact - desc = releaseDescription - websiteUrl = siteUrl - vcsUrl = gitUrl - issueTrackerUrl = issueTracker - githubReleaseNotesFile = releaseNotesFile - licenses = allLicenses - dryRun = false - publish = true - override = false - publicDownloadNumbers = false - - version { - desc = releaseDescription - } - } -} - -bintrayUpload.dependsOn("install") - -// Utility method to extract a single entry from a Zip Archive -private def extractZipEntry(File archiveFile, String entryPath, String outputPath) { - if(!archiveFile.exists()) { - throw new GradleException("Archive File $archiveFile not found") - } - - def zipFile = new ZipFile(archiveFile) - - zipFile.entries().each { - if(it.name == entryPath) { - def path = Paths.get(outputPath) - if(!Files.exists(path)) { - Files.createDirectories(path.getParent()) - Files.copy(zip.getInputStream(it), path) - } - } + signing { + sign publishing.publications } - zip.close() } -String propertyOrDefault(String propertyName, String defaultValue = "") { - def propertyValue = project.properties[propertyName] - return ((propertyValue != null) ? propertyValue : defaultValue) +private def getPropertyOrDefault(key, defaultValue) { + def foundProperty = properties[key] + return ((foundProperty != null) ? foundProperty : defaultValue) } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fc1a0f8..2c06ae9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 91a8b5f..f1b7aec 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,7 +1,5 @@ apply plugin: 'com.android.application' - apply plugin: 'kotlin-android' - apply plugin: 'kotlin-android-extensions' android { diff --git a/sample/release/arvi-demo.apk b/sample/release/arvi-demo.apk deleted file mode 100644 index 3d37717..0000000 Binary files a/sample/release/arvi-demo.apk and /dev/null differ diff --git a/sample/release/output.json b/sample/release/output.json deleted file mode 100644 index 0326ad8..0000000 --- a/sample/release/output.json +++ /dev/null @@ -1 +0,0 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20,"versionName":"1.1.0","enabled":true,"outputFile":"sample-release.apk","fullName":"release","baseName":"release"},"path":"sample-release.apk","properties":{}}] \ No newline at end of file diff --git a/sample/release/sample-release.apk b/sample/release/sample-release.apk deleted file mode 100644 index d46dc8b..0000000 Binary files a/sample/release/sample-release.apk and /dev/null differ diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 0de4c63..81611be 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -19,7 +19,8 @@ + android:configChanges="orientation|screenSize|keyboard|keyboardHidden" + android:exported="true"> @@ -29,13 +30,7 @@ - - - - - - + android:configChanges="orientation|screenSize|keyboard|keyboardHidden"/> diff --git a/sample/src/main/java/com/arthurivanets/sample/ArviApplication.kt b/sample/src/main/java/com/arthurivanets/sample/ArviApplication.kt index 12d4aba..9366529 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ArviApplication.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ArviApplication.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItem.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItem.kt index 15a8535..73a9ba0 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItem.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItem.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemResources.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemResources.kt index fc1cc87..d48ea5a 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemResources.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemResources.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemViewHolder.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemViewHolder.kt index 9aab34f..560ffbf 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemViewHolder.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemViewHolder.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemsRecyclerViewAdapter.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemsRecyclerViewAdapter.kt index cdbf411..b41a978 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemsRecyclerViewAdapter.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/adapster/VideoItemsRecyclerViewAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/base/BaseViewPagerAdapter.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/base/BaseViewPagerAdapter.kt index f29222c..ac8d8b8 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/base/BaseViewPagerAdapter.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/base/BaseViewPagerAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemViewHolder.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemViewHolder.kt index adceff9..f6d4317 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemViewHolder.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemViewHolder.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemsRecyclerViewAdapter.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemsRecyclerViewAdapter.kt index e128dc5..b5bd606 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemsRecyclerViewAdapter.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/basic/BasicVideoItemsRecyclerViewAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/adapters/videos/VideosViewPagerAdapter.kt b/sample/src/main/java/com/arthurivanets/sample/adapters/videos/VideosViewPagerAdapter.kt index 31fb268..15a1536 100644 --- a/sample/src/main/java/com/arthurivanets/sample/adapters/videos/VideosViewPagerAdapter.kt +++ b/sample/src/main/java/com/arthurivanets/sample/adapters/videos/VideosViewPagerAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/model/Video.kt b/sample/src/main/java/com/arthurivanets/sample/model/Video.kt index 8289c68..465c47c 100644 --- a/sample/src/main/java/com/arthurivanets/sample/model/Video.kt +++ b/sample/src/main/java/com/arthurivanets/sample/model/Video.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/adapster/AdapsterVideosFragment.kt b/sample/src/main/java/com/arthurivanets/sample/ui/adapster/AdapsterVideosFragment.kt index 181e5fd..f79ef86 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/adapster/AdapsterVideosFragment.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/adapster/AdapsterVideosFragment.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseActivity.kt b/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseActivity.kt index 5e09a32..2585a50 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseActivity.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseFragment.kt b/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseFragment.kt index 4eca0a1..6ad4c0c 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseFragment.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/base/BaseFragment.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/basic/BasicVideosFragment.kt b/sample/src/main/java/com/arthurivanets/sample/ui/basic/BasicVideosFragment.kt index d757362..f60f735 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/basic/BasicVideosFragment.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/basic/BasicVideosFragment.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/main/MainActivity.kt b/sample/src/main/java/com/arthurivanets/sample/ui/main/MainActivity.kt index 9c4122f..140d4ab 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/main/MainActivity.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/main/MainActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/videos/Type.kt b/sample/src/main/java/com/arthurivanets/sample/ui/videos/Type.kt index 4da21a9..3ea1c0b 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/videos/Type.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/videos/Type.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/videos/VideosActivity.kt b/sample/src/main/java/com/arthurivanets/sample/ui/videos/VideosActivity.kt index fa9f6cc..d1cd4e5 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/videos/VideosActivity.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/videos/VideosActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/widget/AdvancedFrameLayout.kt b/sample/src/main/java/com/arthurivanets/sample/ui/widget/AdvancedFrameLayout.kt index b4ebb99..b2ef884 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/widget/AdvancedFrameLayout.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/widget/AdvancedFrameLayout.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/ui/widget/markers/Roundable.kt b/sample/src/main/java/com/arthurivanets/sample/ui/widget/markers/Roundable.kt index e25314f..b599789 100644 --- a/sample/src/main/java/com/arthurivanets/sample/ui/widget/markers/Roundable.kt +++ b/sample/src/main/java/com/arthurivanets/sample/ui/widget/markers/Roundable.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/extensions/ContextExtensions.kt b/sample/src/main/java/com/arthurivanets/sample/util/extensions/ContextExtensions.kt index 6b6125e..0fa20fe 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/extensions/ContextExtensions.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/extensions/ContextExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/extensions/DrawableExtensions.kt b/sample/src/main/java/com/arthurivanets/sample/util/extensions/DrawableExtensions.kt index ddd3658..8f6e5c9 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/extensions/DrawableExtensions.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/extensions/DrawableExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/extensions/GeneralExtensions.kt b/sample/src/main/java/com/arthurivanets/sample/util/extensions/GeneralExtensions.kt index f9a6db2..a78eb2f 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/extensions/GeneralExtensions.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/extensions/GeneralExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/extensions/ProgressBarExtensions.kt b/sample/src/main/java/com/arthurivanets/sample/util/extensions/ProgressBarExtensions.kt index 733ede7..ede0d5d 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/extensions/ProgressBarExtensions.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/extensions/ProgressBarExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/extensions/ViewExtensions.kt b/sample/src/main/java/com/arthurivanets/sample/util/extensions/ViewExtensions.kt index f27742e..33b2251 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/extensions/ViewExtensions.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/extensions/ViewExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/listeners/ArviViewPagerPlaybackController.kt b/sample/src/main/java/com/arthurivanets/sample/util/listeners/ArviViewPagerPlaybackController.kt index a5a01f1..c88818c 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/listeners/ArviViewPagerPlaybackController.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/listeners/ArviViewPagerPlaybackController.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnPageChangeListenerAdapter.kt b/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnPageChangeListenerAdapter.kt index 118aa62..42df2b9 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnPageChangeListenerAdapter.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnPageChangeListenerAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnTabSelectedListenerAdapter.kt b/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnTabSelectedListenerAdapter.kt index a63cf1a..2e50cfc 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnTabSelectedListenerAdapter.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/listeners/OnTabSelectedListenerAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/markers/CanHandleBackPressEvents.kt b/sample/src/main/java/com/arthurivanets/sample/util/markers/CanHandleBackPressEvents.kt index ba436b4..a2626f5 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/markers/CanHandleBackPressEvents.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/markers/CanHandleBackPressEvents.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/markers/CanManagePlayback.kt b/sample/src/main/java/com/arthurivanets/sample/util/markers/CanManagePlayback.kt index aab2181..dd927d0 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/markers/CanManagePlayback.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/markers/CanManagePlayback.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/markers/HasTitle.kt b/sample/src/main/java/com/arthurivanets/sample/util/markers/HasTitle.kt index 8f4fa48..a47170b 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/markers/HasTitle.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/markers/HasTitle.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/misc/MathUtils.kt b/sample/src/main/java/com/arthurivanets/sample/util/misc/MathUtils.kt index a40a45b..10832ce 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/misc/MathUtils.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/misc/MathUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/java/com/arthurivanets/sample/util/providers/VideoProvider.kt b/sample/src/main/java/com/arthurivanets/sample/util/providers/VideoProvider.kt index 7df2629..f1e65dd 100644 --- a/sample/src/main/java/com/arthurivanets/sample/util/providers/VideoProvider.kt +++ b/sample/src/main/java/com/arthurivanets/sample/util/providers/VideoProvider.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017 Arthur Ivanets, arthur.ivanets.l@gmail.com + * Copyright 2017 Arthur Ivanets, arthur.ivanets.work@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sample/src/main/res/values-v21/styles.xml b/sample/src/main/res/values-v21/styles.xml index 545e69b..3f0fc6d 100644 --- a/sample/src/main/res/values-v21/styles.xml +++ b/sample/src/main/res/values-v21/styles.xml @@ -1,7 +1,7 @@ - diff --git a/sample/src/main/res/values/styles.xml b/sample/src/main/res/values/styles.xml index fa4a14d..c78342c 100644 --- a/sample/src/main/res/values/styles.xml +++ b/sample/src/main/res/values/styles.xml @@ -2,7 +2,7 @@ -