Skip to content

Commit

Permalink
Upgrade Exoplayer 2.18.0 to 2.18.1 to Fix Exoplayer MP4 Parser Issue
Browse files Browse the repository at this point in the history
1. Downgrade some dependencies
androidxRoomVersion 2.4.2 to 2.3.0
groupie 2.10.1 to 2.8.1
2. Remove Checkstyle
3. revert Use JvmOverloads
  • Loading branch information
ShareASmile committed Jun 17, 2024
1 parent 7f0b2fb commit 1743c1f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 245 deletions.
55 changes: 13 additions & 42 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id "kotlin-android"
id "kotlin-kapt"
id "kotlin-parcelize"
id "checkstyle"
id "org.sonarqube" version "3.3"
}

Expand Down Expand Up @@ -41,10 +40,10 @@ android {
if (normalizedWorkingBranch.isEmpty() || workingBranch == "master" || workingBranch == "dev") {
// default values when branch name could not be determined or is master or dev
applicationIdSuffix ".debug"
resValue "string", "app_name", "NewPipe Debug"
resValue "string", "app_name", "NewPipe Legacy Debug"
} else {
applicationIdSuffix ".debug." + normalizedWorkingBranch
resValue "string", "app_name", "NewPipe " + workingBranch
resValue "string", "app_name", "NewPipe Legacy " + workingBranch
archivesBaseName = 'NewPipe_' + normalizedWorkingBranch
}
}
Expand All @@ -59,7 +58,7 @@ android {
archivesBaseName = 'NewPipe_' + System.getProperty('packageSuffix')
}
minifyEnabled true
shrinkResources false // disabled to fix F-Droid's reproducible build
shrinkResources true // could be disabled to fix F-Droid's reproducible build
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
archivesBaseName = 'app'
applicationIdSuffix ".Flora"
Expand Down Expand Up @@ -90,6 +89,11 @@ android {
jvmTarget = JavaVersion.VERSION_11
}

// Required and used only by groupie
androidExtensions {
experimental = true
}

sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
Expand All @@ -100,16 +104,14 @@ android {
}

ext {
checkstyleVersion = '10.3.1'

androidxLifecycleVersion = '2.3.1'
androidxRoomVersion = '2.4.2'
androidxRoomVersion = '2.3.0'
androidxWorkVersion = '2.7.1'

icepickVersion = '3.2.0'
exoPlayerVersion = '2.18.0'
exoPlayerVersion = '2.18.1'
googleAutoServiceVersion = '1.0.1'
groupieVersion = '2.10.1'
groupieVersion = '2.8.1'
markwonVersion = '4.6.2'

leakCanaryVersion = '2.5'
Expand All @@ -119,38 +121,9 @@ ext {
}

configurations {
checkstyle
ktlint
}

checkstyle {
getConfigDirectory().set(rootProject.file("checkstyle"))
ignoreFailures false
showViolations true
toolVersion = checkstyleVersion
}

task runCheckstyle(type: Checkstyle) {
source 'src'
include '**/*.java'
exclude '**/gen/**'
exclude '**/R.java'
exclude '**/BuildConfig.java'
exclude 'main/java/us/shandian/giga/**'

classpath = configurations.checkstyle

showViolations true

reports {
xml.getRequired().set(true)
html.getRequired().set(true)
}
}

def outputDir = "${project.buildDir}/reports/ktlint/"
def inputFiles = project.fileTree(dir: "src", include: "**/*.kt")

task runKtlint(type: JavaExec) {
inputs.files(inputFiles)
outputs.dir(outputDir)
Expand Down Expand Up @@ -193,12 +166,10 @@ dependencies {
// This works thanks to JitPack: https://jitpack.io/
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
implementation 'com.github.ShareASmile:NewPipeExtractor:9f741d54b2'
//implementation 'com.github.TeamNewPipe:NewPipeExtractor:eb07d70a2ce03bee3cc74fc33b2e4173e1c21436'


/** Checkstyle **/
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
ktlint 'com.pinterest:ktlint:0.45.2'
/** Ktlint **/
ktlint 'com.pinterest:ktlint:0.43.2'

/** Kotlin **/
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
Expand Down
9 changes: 8 additions & 1 deletion app/src/main/java/org/schabi/newpipelegacy/ktx/View.kt
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,14 @@ private fun View.animateLightSlideAndAlpha(enterOrExit: Boolean, duration: Long,
}
}

@JvmOverloads
fun View.slideUp(
duration: Long,
delay: Long,
@FloatRange(from = 0.0, to = 1.0) translationPercent: Float
) {
slideUp(duration, delay, translationPercent, null)
}

fun View.slideUp(
duration: Long,
delay: Long = 0L,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Based on ExoPlayer's DefaultHttpDataSource, version 2.18.0.
* Based on ExoPlayer's DefaultHttpDataSource, version 2.18.1.
*
* Original source code copyright (C) 2016 The Android Open Source Project, licensed under the
* Apache License, Version 2.0.
Expand Down
188 changes: 0 additions & 188 deletions checkstyle/checkstyle.xml

This file was deleted.

13 changes: 0 additions & 13 deletions checkstyle/suppressions.xml

This file was deleted.

0 comments on commit 1743c1f

Please sign in to comment.