Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ct7ct7ct7 committed Apr 20, 2022
2 parents b5a1049 + 39edbc9 commit 7ec9db3
Show file tree
Hide file tree
Showing 26 changed files with 353 additions and 297 deletions.
2 changes: 1 addition & 1 deletion bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply plugin: 'com.jfrog.bintray'


group = "com.ct7ct7ct7.androidvimeoplayer"
version = "1.2.2"
version = "2.0.0"

def siteUrl = 'https://github.com/ct7ct7ct7/Android-VimeoPlayer'
def gitUrl = 'https://github.com/ct7ct7ct7/Android-VimeoPlayer'
Expand Down
32 changes: 5 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
buildscript {

project.ext {
compileSdk = 28
minSdk = 19
targetSdk = 28

kotlin_version = '1.3.11'
}

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}

allprojects {
repositories {
google()
jcenter()
}
plugins {
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
id 'org.jetbrains.kotlin.android' version '1.6.20' apply false
id "org.jetbrains.kotlin.kapt" version "1.6.20" apply false
}

task clean(type: Delete) {
Expand Down
14 changes: 12 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
38 changes: 23 additions & 15 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
// from rootProject.file('bintray.gradle')
}


android {
compileSdkVersion compileSdk
compileSdk 31

defaultConfig {
minSdkVersion minSdk
targetSdkVersion targetSdk
versionCode 1
versionName "1.0"
minSdk 19
targetSdk 31

consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
Expand All @@ -16,16 +21,19 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
}

apply from: rootProject.file('bintray.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.ct7ct7ct7.androidvimeoplayer.R;
import com.ct7ct7ct7.androidvimeoplayer.listeners.VimeoPlayerReadyListener;
import com.ct7ct7ct7.androidvimeoplayer.listeners.VimeoPlayerTimeListener;
import com.ct7ct7ct7.androidvimeoplayer.model.TextTrack;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class VimeoPlayerActivity extends AppCompatActivity {
public static final String RESULT_STATE_VIDEO_ID = "RESULT_STATE_VIDEO_ID";
public static final String RESULT_STATE_VIDEO_PLAY_AT = "RESULT_STATE_VIDEO_PLAY_AT";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.ct7ct7ct7.androidvimeoplayer.view;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
Expand Down Expand Up @@ -30,6 +27,10 @@
import com.ct7ct7ct7.androidvimeoplayer.listeners.VimeoPlayerVolumeListener;
import com.ct7ct7ct7.androidvimeoplayer.view.menu.ViemoMenuItem;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

public class VimeoPlayerView extends FrameLayout implements LifecycleObserver {
public VimeoOptions defaultOptions;
public int defaultColor = Color.rgb(0, 172, 240);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.ct7ct7ct7.androidvimeoplayer.view.menu;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -14,6 +11,10 @@

import java.util.List;

import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;


class MenuAdapter extends RecyclerView.Adapter<MenuAdapter.ViewHolder> {
@NonNull private final Context context;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.ct7ct7ct7.androidvimeoplayer.view.menu;

import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;


public class ViemoMenuItem {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package com.ct7ct7ct7.androidvimeoplayer.view.menu;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -17,6 +13,11 @@
import java.util.ArrayList;
import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;


public class ViemoPlayerMenu {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.ct7ct7ct7.androidvimeoplayer.R;

import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;

public class VimeoDividerItemDecoration extends RecyclerView.ItemDecoration {
private Drawable mDivider;

Expand Down
40 changes: 28 additions & 12 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,48 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
id 'kotlin-kapt'

}

android {
compileSdkVersion compileSdk
compileSdk 31

defaultConfig {
applicationId "com.ct7ct7ct7.androidvimeoplayersample"
minSdkVersion minSdk
targetSdkVersion targetSdk
versionCode 1
versionName "1.0"
minSdk 19
targetSdk 31

consumerProguardFiles "consumer-rules.pro"
}


buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'

}
21 changes: 8 additions & 13 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.ct7ct7ct7.androidvimeoplayersample"
xmlns:android="http://schemas.android.com/apk/res/android">
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -11,32 +11,27 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".examples.FullscreenActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".examples.MenuActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".examples.OriginalControlsActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".examples.RecyclerViewActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"/>
android:theme="@style/AppTheme.NoActionBar" />
</application>

</manifest>
Loading

0 comments on commit 7ec9db3

Please sign in to comment.