-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to libvlc 2.1.12. New project structure. Now using JCenter.
- Loading branch information
Showing
92 changed files
with
1,318 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,22 @@ | ||
vlc-android-sdk | ||
=============== | ||
|
||
VLC Android SDK pushed to Maven Central. Primarily used in project tomahawk-android. | ||
|
||
https://github.com/tomahawk-player/tomahawk-android | ||
Unofficial VLC Android SDK pushed to JCenter. | ||
Supported ABIs are armeabi-v7a, arm64-v8a, x86 and x86_64. | ||
|
||
Reporting issues | ||
------------------------ | ||
Please contact the videolan team directly. I am only publishing LibVLC for Android on Maven Central. | ||
Please contact the videolan team directly. I am only publishing LibVLC for Android JCenter. | ||
|
||
https://trac.videolan.org/vlc | ||
|
||
Get it via Maven Central | ||
Get it via JCenter | ||
------------------------ | ||
Just add this dependency to your project and you're good to go. | ||
|
||
<pre>dependencies { | ||
compile "de.mrmaffen:vlc-android-sdk:2.0.6" | ||
<pre>repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
compile 'de.mrmaffen:libvlc-android:2.1.12@aar' | ||
}</pre> | ||
|
||
**NOTE: 2.0.6 is the latest version! Please ignore the old version 3.0.0.** | ||
|
||
Building the LibVLC Android SDK yourself | ||
---------------------------------------- | ||
|
||
To build a fresh version of the LibVLC Android SDK please make sure that you have setup your machine correctly | ||
(You can ignore the steps after and including 'Building'): https://wiki.videolan.org/AndroidCompile | ||
|
||
Afterwards simply run this Gradle command: | ||
```./gradlew buildLibVlc``` | ||
|
||
The VLC-Android and the VLC repo will now get pulled if they haven't been previously. | ||
After that's done the compilation process for the ABIs armeabi-v7a, x86 and armeabi gets started. | ||
Finally the resulting .java files will be copied over into the src/main/java folder of this project. | ||
The resulting .so files will be copied into src/main/jniLibs. | ||
|
||
Building a specific version of the LibVLC Android SDK | ||
----------------------------------------------------- | ||
|
||
If you want to build a specific version (maybe you want a major stable release) you have to | ||
checkout the vlc-android git repository at the corresponding commit: | ||
``` | ||
cd vlc-android // if this folder doesn't exist yet, simply run ./gradlew cloneVlcAndroid | ||
git tag // to list all release versions | ||
git checkout {tag-name} // to checkout the git repo at the given tag | ||
cd .. | ||
./gradlew buildLibVlc // build it | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,168 +1,11 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.3.1' | ||
classpath 'org.ajoberstar:gradle-git:1.3.2' | ||
} | ||
} | ||
apply plugin: 'com.android.library' | ||
android { | ||
compileSdkVersion 23 | ||
buildToolsVersion '23.0.2' | ||
|
||
defaultConfig { | ||
minSdkVersion 9 | ||
targetSdkVersion 23 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile "com.android.support:support-v4:23.1.1" | ||
compile 'com.android.support:support-annotations:23.1.1' | ||
} | ||
|
||
allprojects { | ||
version = VERSION_NAME | ||
group = GROUP | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
classpath 'com.android.tools.build:gradle:2.3.3' | ||
|
||
import org.ajoberstar.grgit.Grgit | ||
|
||
project.ext.vlcAndroidSource = file('vlc-android') | ||
project.ext.vlcSource = file('vlc-android/vlc') | ||
|
||
task cloneVlcAndroid << { | ||
Grgit.clone(uri: 'https://code.videolan.org/videolan/vlc-android.git', | ||
dir: project.ext.vlcAndroidSource) | ||
} | ||
|
||
// Only clone once. | ||
cloneVlcAndroid.onlyIf { !project.ext.vlcAndroidSource.exists() } | ||
|
||
task updateVlcCheckout(dependsOn: 'cloneVlcAndroid') << { | ||
try { | ||
def repo = Grgit.open(project.ext.vlcSource) | ||
repo.pull(rebase: true) | ||
} | ||
catch (RuntimeException e) { | ||
logger.warn("Wasn't able to update checkout at " + project.ext.vlcSource + ": " | ||
+ e.getClass() + " - " + e.getLocalizedMessage()); | ||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
} | ||
|
||
// Don't update vlc checkout if it doesn't exist yet. | ||
// This is the case when we're building for the first time. | ||
updateVlcCheckout.onlyIf { project.ext.vlcSource.exists() } | ||
|
||
task purgeOldJniLibs(type: Delete, dependsOn: 'updateVlcCheckout') { | ||
delete "src/main/jniLibs" | ||
} | ||
|
||
task purgeOldJava(type: Delete, dependsOn: 'purgeOldJniLibs') { | ||
delete "src/main/java" | ||
} | ||
|
||
task compileVlcArmv7a(type: Exec, dependsOn: 'purgeOldJava') { | ||
workingDir project.ext.vlcAndroidSource | ||
commandLine './compile.sh' | ||
args "-a", "armeabi-v7a" | ||
args "release" // Remove this to build a debug libvlc | ||
args "-l" // only build libvlc | ||
} | ||
|
||
task buildVlcArmv7a(type: Copy, dependsOn: 'compileVlcArmv7a') { | ||
from(vlcAndroidSource.getAbsolutePath() + '/libvlc/jni/libs/armeabi-v7a/') | ||
into('src/main/jniLibs/armeabi-v7a/') | ||
finalizedBy 'copyLibVlcFiles' | ||
} | ||
|
||
/* | ||
task compileVlcArmv8a(type: Exec, dependsOn: 'purgeOldJava') { | ||
workingDir project.ext.vlcAndroidSource | ||
commandLine './compile.sh' | ||
args "-a", "arm64-v8a" | ||
args "release" // Remove this to build a debug libvlc | ||
args "-l" // only build libvlc | ||
} | ||
task buildVlcArmv8a(type: Copy, dependsOn: 'compileVlcArmv8a') { | ||
from(vlcAndroidSource.getAbsolutePath() + '/libvlc/jni/libs/arm64-v8a/') | ||
into('src/main/jniLibs/arm64-v8a/') | ||
finalizedBy 'copyLibVlcFiles' | ||
} | ||
*/ | ||
|
||
task compileVlcMips(type: Exec, dependsOn: 'purgeOldJava') { | ||
workingDir project.ext.vlcAndroidSource | ||
commandLine './compile.sh' | ||
args "-a", "mips" | ||
args "release" // Remove this to build a debug libvlc | ||
args "-l" // only build libvlc | ||
} | ||
|
||
task buildVlcMips(type: Copy, dependsOn: 'compileVlcMips') { | ||
from(vlcAndroidSource.getAbsolutePath() + '/libvlc/jni/libs/mips/') | ||
into('src/main/jniLibs/mips/') | ||
finalizedBy 'copyLibVlcFiles' | ||
} | ||
|
||
task compileVlcX86(type: Exec, dependsOn: 'purgeOldJava') { | ||
workingDir project.ext.vlcAndroidSource | ||
commandLine './compile.sh' | ||
args "-a", "x86" | ||
args "release" // Remove this to build a debug libvlc | ||
args "-l" // only build libvlc | ||
} | ||
|
||
task buildVlcX86(type: Copy, dependsOn: 'compileVlcX86') { | ||
from(vlcAndroidSource.getAbsolutePath() + '/libvlc/jni/libs/x86/') | ||
into('src/main/jniLibs/x86/') | ||
finalizedBy 'copyLibVlcFiles' | ||
} | ||
|
||
/* | ||
task compileVlcX8664(type: Exec, dependsOn: 'purgeOldJava') { | ||
workingDir project.ext.vlcAndroidSource | ||
commandLine './compile.sh' | ||
args "-a", "x86_64" | ||
args "release" // Remove this to build a debug libvlc | ||
args "-l" // only build libvlc | ||
} | ||
task buildVlcX8664(type: Copy, dependsOn: 'compileVlcX8664') { | ||
from(vlcAndroidSource.getAbsolutePath() + '/libvlc/jni/libs/x86_64/') | ||
into('src/main/jniLibs/x86_64/') | ||
finalizedBy 'copyLibVlcFiles' | ||
} | ||
*/ | ||
|
||
task copyLibVlcFiles(type: Copy) { | ||
from(vlcAndroidSource.getAbsolutePath() + '/libvlc/src/') | ||
into('src/main/java') | ||
} | ||
|
||
task buildLibVlc() { | ||
} | ||
|
||
buildLibVlc.dependsOn { | ||
tasks.findAll { task -> task.name.startsWith('buildVlc') } | ||
} | ||
|
||
tasks.withType(Javadoc).all { enabled = false } | ||
|
||
//upload aar to maven central with sonatype | ||
apply from: 'https://raw.githubusercontent.com/chrisbanes/gradle-mvn-push/97de89785bdbf0bc0b380fb60851cabc552811dc/gradle-mvn-push.gradle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Nov 27 19:38:36 CET 2014 | ||
#Sun Jul 02 16:17:25 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Oops, something went wrong.