Skip to content

Commit

Permalink
- Updated README
Browse files Browse the repository at this point in the history
- Updated dependencies
  • Loading branch information
AbedElazizShe committed Jul 27, 2020
1 parent 57d9688 commit bbfb74c
Show file tree
Hide file tree
Showing 86 changed files with 56 additions and 105 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ allprojects {
Include this in your Module-level build.gradle file:

```groovy
implementation 'com.github.AbedElazizShe:LightCompressor:0.6.0'
implementation 'com.github.AbedElazizShe:LightCompressor:0.6.1'
```

## Getting help
Expand Down
38 changes: 19 additions & 19 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion(Config.compileSdkVersion)
compileSdkVersion 29
defaultConfig {
applicationId(Config.packageName)
minSdkVersion(Config.minSdkVersion)
targetSdkVersion(Config.targetSdkVersion)
versionCode(Config.versionCode)
versionName(Config.versionName)
applicationId "com.abedelazizshe.lightcompressor"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -26,19 +26,19 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(Dep.kotlin)
implementation(Dep.appcompat)
implementation(Dep.corex)
implementation(Dep.constraintlayout)
implementation(Dep.material)
implementation(Dep.glide)
implementation(Dep.coroutinesCore)
implementation(Dep.coroutinesAndroid)
kapt(Dep.glideCompiler)
implementation(Dep.exoPlayer)
implementation "org.jetbrains.kotlin:kotlin-stdlib:${project.kotlin}"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.core:core-ktx:${project.androidX}"
implementation "androidx.constraintlayout:constraintlayout:${project.constraintlayout}"
implementation "com.google.android.material:material:${project.material}"
implementation "com.github.bumptech.glide:glide:${project.glide}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${project.coroutines}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${project.coroutines}"
kapt "com.github.bumptech.glide:compiler:${project.glide}"
implementation "com.google.android.exoplayer:exoplayer:${project.exoPlayer}"
implementation project(':lightcompressor')

testImplementation(Dep.junit)
androidTestImplementation(Dep.testJunit)
androidTestImplementation(Dep.espresso)
testImplementation "junit:junit:${project.junit}"
androidTestImplementation "androidx.test.ext:junit:${project.testJunit}"
androidTestImplementation "androidx.test.espresso:espresso-core:${project.espresso}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fun getMediaPath(context: Context, uri: Uri?): String {
val projection = arrayOf(MediaStore.Video.Media.DATA)
var cursor: Cursor? = null
try {
cursor = context.contentResolver.query(uri, projection, null, null, null)
cursor = context.contentResolver.query(uri!!, projection, null, null, null)
return if (cursor != null) {
val columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA)
cursor.moveToFirst()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class VideoPlayerActivity : AppCompatActivity() {
setContentView(R.layout.activity_video_player)

if (intent != null) {
val bundle: Bundle = intent.extras
val bundle: Bundle = intent.extras!!
uri = bundle.getString("uri", "")
}

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

buildscript {
ext.kotlin_version = '1.3.50'
buildscript {
ext.kotlin_version = '1.3.72'
ext.build_gradle = '4.0.1'

repositories {
google()
jcenter()

}
dependencies {
classpath(Dep.pluginBuildGradle)
classpath(Dep.pluginKotlinGradle)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }
classpath "com.android.tools.build:gradle:$build_gradle"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()

maven { url 'https://jitpack.io' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

ext {
kotlin = "1.3.72"
junit = "4.13"
espresso = "3.2.0"
androidX = "1.3.1"
constraintlayout = "1.1.3"
material = "1.1.0-alpha07"
glide = "4.11.0"
exoPlayer = "2.8.4"
coroutines = "1.3.8"
testJunit = "1.1.1"
appCompat = "1.1.0"
}
7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

Binary file removed buildSrc/build/classes/kotlin/main/Config.class
Binary file not shown.
Binary file not shown.
Binary file removed buildSrc/build/classes/kotlin/main/Dep.class
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion buildSrc/build/kotlin/buildSrcjar-classes.txt

This file was deleted.

Binary file removed buildSrc/build/kotlin/compileKotlin/build-history.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed buildSrc/build/kotlin/compileKotlin/last-build.bin
Binary file not shown.
Binary file removed buildSrc/build/libs/buildSrc.jar
Binary file not shown.

This file was deleted.

Empty file.
2 changes: 0 additions & 2 deletions buildSrc/build/tmp/jar/MANIFEST.MF

This file was deleted.

9 changes: 0 additions & 9 deletions buildSrc/src/main/java/Config.kt

This file was deleted.

41 changes: 0 additions & 41 deletions buildSrc/src/main/java/Dep.kt

This file was deleted.

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-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
19 changes: 10 additions & 9 deletions lightcompressor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
compileSdkVersion 29


defaultConfig {
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand All @@ -26,13 +26,14 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(Dep.kotlin)
implementation(Dep.corex)
implementation "org.jetbrains.kotlin:kotlin-stdlib:${project.kotlin}"
implementation "androidx.core:core-ktx:${project.androidX}"
implementation files('libs/isoparser-1.0.6.jar')
implementation files('libs/aspectjrt-1.7.3.jar')
implementation(Dep.coroutinesCore)
implementation(Dep.coroutinesAndroid)
testImplementation(Dep.junit)
androidTestImplementation(Dep.testJunit)
androidTestImplementation(Dep.espresso)
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${project.coroutines}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${project.coroutines}"
testImplementation "junit:junit:${project.junit}"
androidTestImplementation "androidx.test.ext:junit:${project.testJunit}"
androidTestImplementation "androidx.test.espresso:espresso-core:${project.espresso}"
}

Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ object Compressor {
val inputBufferIndex = decoder.dequeueInputBuffer(0)
if (inputBufferIndex >= 0) {
val inputBuffer = decoder.getInputBuffer(inputBufferIndex)
val chunkSize = extractor.readSampleData(inputBuffer, 0)
val chunkSize = extractor.readSampleData(inputBuffer!!, 0)
when {
chunkSize < 0 -> {
decoder.queueInputBuffer(
Expand Down

0 comments on commit bbfb74c

Please sign in to comment.