Skip to content

Commit

Permalink
🔨 Convert video thumbnail demo to kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyge committed Sep 30, 2017
1 parent 745d222 commit 1ec9300
Show file tree
Hide file tree
Showing 23 changed files with 511 additions and 464 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.50'
repositories {
jcenter()
maven { url 'https://dl.google.com/dl/android/maven2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/display_video_thumbnail.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ sketchImageView.displayImage(videoFileUri);
[UriModel]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/UriModel.java
[sample-video-thumbnail]: ../../sample-video-thumbnail/
[FFmpegMediaMetadataRetriever]: https://github.com/wseemann/FFmpegMediaMetadataRetriever
[VideoThumbnailUriModel.java]: ../../sample-video-thumbnail/src/main/java/me/xiaopan/sketch_video_thumbnail_sample/VideoThumbnailUriModel.java
[VideoThumbnailUriModel.java]: ../../sample-video-thumbnail/src/main/java/me/xiaopan/ssvt/VideoThumbnailUriModel.java
[UriModelRegistry]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/UriModelRegistry.java
2 changes: 1 addition & 1 deletion docs/wiki/uri_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ configuration.getUriModelRegistry().add(new MyUriModel());
[Base64VariantUriModel]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/Base64VariantUriModel.java
[AbsBitmapDiskCacheUriModel]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/AbsBitmapDiskCacheUriModel.java
[ApkIconUriModel]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/ApkIconUriModel.java
[VideoThumbnailUriModel]: ../../sample-video-thumbnail/src/main/java/me/xiaopan/sketch_video_thumbnail_sample/VideoThumbnailUriModel.java
[VideoThumbnailUriModel]: ../../sample-video-thumbnail/src/main/java/me/xiaopan/ssvt/VideoThumbnailUriModel.java
[AppIconUriModel]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/AppIconUriModel.java
[ContentUriModel]: ../../sketch/src/main/java/me/xiaopan/sketch/uri/ContentUriModel.java
[DiskCache]: ../../sketch/src/main/java/me/xiaopan/sketch/cache/DiskCache.java
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ BUILD_TOOLS_VERSION=25.0.2
MIN_SDK_VERSION=10

TARGET_SDK_VERSION=22
TARGET_SDK_VERSION_LIBRARY=25
TARGET_SDK_VERSION_LIBRARY=22

VERSION_CODE=2493
VERSION_NAME=2.5.0-b1

ANDROID_SUPPORT_LIBRARY_VERSION=25.3.0
CONSTRAINT_LAYOUT_VERSION=1.0.2
ASSEMBLY_ADAPTER_VERSION=2.3.1
ASSEMBLY_ADAPTER_VERSION=2.3.2
PAGER_SLIDING_TAB_STRIP_VERSION=1.7.1
BUTTER_KNIFE_VERSION=8.8.0
FFMPEG_MEDIA_METADATA_RETRIEVER_VERSION=1.0.14
Expand Down
8 changes: 4 additions & 4 deletions sample-video-thumbnail/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
buildToolsVersion "${BUILD_TOOLS_VERSION}"

defaultConfig {
applicationId "me.xiaopan.sketch_video_thumbnail_sample"
applicationId "me.xiaopan.ssvt"
minSdkVersion 14
targetSdkVersion TARGET_SDK_VERSION_LIBRARY.toInteger()
versionCode VERSION_CODE.toInteger()
Expand All @@ -25,6 +26,8 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':sketch')

Expand All @@ -35,7 +38,4 @@ dependencies {
implementation "me.xiaopan:assemblyadapter:${ASSEMBLY_ADAPTER_VERSION}"

implementation "com.github.wseemann:FFmpegMediaMetadataRetriever:${FFMPEG_MEDIA_METADATA_RETRIEVER_VERSION}"

implementation "com.jakewharton:butterknife:${BUTTER_KNIFE_VERSION}"
annotationProcessor "com.jakewharton:butterknife-compiler:${BUTTER_KNIFE_VERSION}"
}
6 changes: 3 additions & 3 deletions sample-video-thumbnail/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 xmlns:android="http://schemas.android.com/apk/res/android"
package="me.xiaopan.sketch_video_thumbnail_sample">
package="me.xiaopan.ssvt">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Expand All @@ -11,7 +11,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name="me.xiaopan.ssvt.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -20,7 +20,7 @@
</activity>

<meta-data
android:name="me.xiaopan.sketch_video_thumbnail_sample.SketchInitializer"
android:name="me.xiaopan.ssvt.SketchInitializer"
android:value="SKETCH_INITIALIZER" />
</application>
</manifest>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1ec9300

Please sign in to comment.