Skip to content

Distribute by jitpack #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Android Texture VideoView having a variety of scale types like the scale types o
# Gradle
```
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}

dependencies {
compile 'com.yqritc:android-scalablevideoview:1.0.4'
compile 'com.yqritc:android-scalablevideoview:1.0.5'
}
```

Expand Down
21 changes: 5 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
plugins {
alias libs.plugins.android.application apply false
alias libs.plugins.android.library apply false
}

allprojects {
repositories {
jcenter()
}
task clean(type: Delete) {
delete rootProject.buildDir
}
14 changes: 6 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
VERSION_NAME=1.0.4
VERSION_CODE=5
android.useAndroidX=true
android.enableJetifier=true

VERSION_NAME=1.0.5
VERSION_CODE=6
GROUP=com.yqritc
ARTIFACT_ID=android-scalablevideoview

COMPILE_SDK_VERSION=23
BUILD_TOOLS_VERSION=23.0.3
TARGET_SDK_VERSION=23
MIN_SDK_VERSION=14

POM_DESCRIPTION=Android texture video view having a variety of scale types
POM_URL=https://github.com/yqritc/Android-ScalableVideoView
[email protected]:yqritc/Android-ScalableVideoView.git
Expand All @@ -19,4 +17,4 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=yqritc
POM_DEVELOPER_NAME=yqritc
[email protected]
ISSUE_URL=https://github.com/yqritc/Android-ScalableVideoView/issues
ISSUE_URL=https://github.com/yqritc/Android-ScalableVideoView/issues
16 changes: 16 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[versions]
sdk-compile = "31"
sdk-min = "14"
sdk-target = "31"

android-plugin = "7.2.1"
android-appcompat = "1.4.2"
android-recyclerview = "1.2.1"

[libraries]
android-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "android-appcompat" }
android-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "android-recyclerview" }

[plugins]
android-application = { id = "com.android.application", version.ref = "android-plugin" }
android-library = { id = "com.android.library", version.ref = "android-plugin" }
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-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
19 changes: 1 addition & 18 deletions library/android-artifacts.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

task androidJar(type: Jar) {
from 'build/intermediates/classes/release'
}

artifacts {
archives androidSourcesJar
archives androidJavadocsJar
archives androidJar
}
}
36 changes: 9 additions & 27 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,22 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}

android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
compileSdk libs.versions.sdk.compile.get() as int

defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
minSdk libs.versions.sdk.min.get() as int
targetSdk libs.versions.sdk.target.get() as int

versionCode VERSION_CODE as int
versionName VERSION_NAME
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
}

android.libraryVariants.all { variant ->
if (variant.buildType.isDebuggable()) {
return; // Skip debug builds.
}
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
ext.androidJar = System.getenv("ANDROID_HOME") +
"/platforms/${android.compileSdkVersion}/android.jar"
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
}

task("bundleJavadoc${variant.name.capitalize()}", type: Jar) {
description "Bundles Javadoc into zip for $variant.name."
classifier = "javadoc"
from tasks["javadoc${variant.name.capitalize()}"]
}
implementation libs.android.appcompat
}

apply from: 'android-artifacts.gradle'
apply from: 'bintray-publish.gradle'
apply from: 'publish.gradle'
32 changes: 0 additions & 32 deletions library/bintray-publish.gradle → library/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

publishing {
publications {
mavenJava(MavenPublication) {
groupId GROUP
version VERSION_NAME
artifactId ARTIFACT_ID
// artifact androidJar
artifact "build/outputs/aar/library-release.aar"
artifact androidJavadocsJar
artifact androidSourcesJar
pom.withXml {
Node root = asNode()
root.appendNode('name', ARTIFACT_ID)
Expand Down Expand Up @@ -39,31 +35,3 @@ publishing {
}
}
}

def getBintrayUserProperty() {
return hasProperty('bintrayUser') ? bintrayUser : ""
}

def getBintrayApiKeyProperty() {
return hasProperty('bintrayApiKey') ? bintrayApiKey : ""
}

bintray {
user = bintrayUserProperty
key = bintrayApiKeyProperty
publications = ['mavenJava']

dryRun = false
publish = false
pkg {
repo = 'maven'
name = ARTIFACT_ID
licenses = ['Apache-2.0']
labels = ['android']

version {
name = VERSION_NAME
vcsTag = VERSION_NAME
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import android.graphics.SurfaceTexture;
import android.media.MediaPlayer;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RawRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RawRes;
import android.util.AttributeSet;
import android.view.Surface;
import android.view.TextureView;
Expand Down
24 changes: 13 additions & 11 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
compileSdk libs.versions.sdk.compile.get() as int

defaultConfig {
applicationId "com.yqritc.scalablevideoview.sample"
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode VERSION_CODE as int
versionName VERSION_NAME
minSdk libs.versions.sdk.min.get() as int
targetSdk libs.versions.sdk.target.get() as int

versionCode 1
versionName "1.0.0"
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -20,8 +23,7 @@ android {
}

dependencies {
compile project(':library')
// compile 'com.yqritc:android-scalablevideoview:1.0.4'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
implementation project(':library')
implementation libs.android.recyclerview
implementation libs.android.appcompat
}
3 changes: 2 additions & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import android.content.Context;
import android.media.MediaPlayer;
import android.support.annotation.RawRes;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.RawRes;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/activity_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
19 changes: 19 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "Android-ScalableVideoView"
include ':library', ':sample'

enableFeaturePreview("VERSION_CATALOGS")