1+ import com.android.tools.profgen.ArtProfileKt
2+ import com.android.tools.profgen.ArtProfileSerializer
3+ import com.android.tools.profgen.DexFile
4+
15plugins {
26 id " com.android.application"
37 id " kotlin-android"
48 id " kotlin-kapt"
59 id " kotlin-parcelize"
610 id " checkstyle"
7- id " org.sonarqube" version " 3.3 "
11+ id " org.sonarqube" version " 3.5.0.2730 "
812}
913
1014android {
11- compileSdk 32
15+ compileSdk 33
1216 namespace ' org.schabi.newpipe'
1317
1418 defaultConfig {
1519 applicationId " org.schabi.newpipe"
1620 resValue " string" , " app_name" , " NewPipe"
1721 minSdk 21
18- targetSdk 29
19- versionCode 991
20- versionName " 0.24.1 "
22+ targetSdk 33
23+ versionCode 992
24+ versionName " 0.25.0 "
2125
2226 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
2327
@@ -107,7 +111,7 @@ ext {
107111 groupieVersion = ' 2.10.1'
108112 markwonVersion = ' 4.6.2'
109113
110- leakCanaryVersion = ' 2.5 '
114+ leakCanaryVersion = ' 2.9.1 '
111115 stethoVersion = ' 1.6.0'
112116 mockitoVersion = ' 4.0.0'
113117 assertJVersion = ' 3.23.1'
@@ -169,7 +173,7 @@ afterEvaluate {
169173 preDebugBuild. dependsOn runCheckstyle, runKtlint
170174}
171175
172- sonarqube {
176+ sonar {
173177 properties {
174178 property " sonar.projectKey" , " TeamNewPipe_NewPipe"
175179 property " sonar.organization" , " teamnewpipe"
@@ -179,15 +183,15 @@ sonarqube {
179183
180184dependencies {
181185/* * Desugaring **/
182- coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:1.1.6 '
186+ coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.0.2 '
183187
184188/* * NewPipe libraries **/
185189 // You can use a local version by uncommenting a few lines in settings.gradle
186190 // Or you can use a commit you pushed to GitHub by just replacing TeamNewPipe with your GitHub
187191 // name and the commit hash with the commit hash of the (pushed) commit you want to test
188192 // This works thanks to JitPack: https://jitpack.io/
189193 implementation ' com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
190- implementation ' com.github.TeamNewPipe:NewPipeExtractor:eb07d70a2ce03bee3cc74fc33b2e4173e1c21436 '
194+ implementation ' com.github.TeamNewPipe:NewPipeExtractor:7e793c11aec46358ccbfd8bcfcf521105f4f093a '
191195 implementation ' com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
192196
193197/* * Checkstyle **/
@@ -259,14 +263,14 @@ dependencies {
259263 implementation " io.noties.markwon:linkify:${ markwonVersion} "
260264
261265 // Crash reporting
262- implementation " ch.acra:acra-core:5.9.3 "
266+ implementation " ch.acra:acra-core:5.9.7 "
263267
264268 // Properly restarting
265269 implementation ' com.jakewharton:process-phoenix:2.1.2'
266270
267271 // Reactive extensions for Java VM
268- implementation " io.reactivex.rxjava3:rxjava:3.0.13 "
269- implementation " io.reactivex.rxjava3:rxandroid:3.0.0 "
272+ implementation " io.reactivex.rxjava3:rxjava:3.1.5 "
273+ implementation " io.reactivex.rxjava3:rxandroid:3.0.2 "
270274 // RxJava binding APIs for Android UI widgets
271275 implementation " com.jakewharton.rxbinding4:rxbinding:4.0.0"
272276
@@ -308,3 +312,24 @@ static String getGitWorkingBranch() {
308312 return " "
309313 }
310314}
315+
316+ project. afterEvaluate {
317+ tasks. compileReleaseArtProfile. doLast {
318+ outputs. files. each { file ->
319+ if (file. toString(). endsWith(" .profm" )) {
320+ println (" Sorting ${ file} ..." )
321+ def version = ArtProfileSerializer . valueOf(" METADATA_0_0_2" )
322+ def profile = ArtProfileKt.ArtProfile (file)
323+ def keys = new ArrayList (profile. profileData. keySet())
324+ def sortedData = new LinkedHashMap ()
325+ Collections . sort keys, new DexFile.Companion ()
326+ keys. each { key -> sortedData[key] = profile. profileData[key] }
327+ new FileOutputStream (file). with {
328+ write(version. magicBytes$profgen)
329+ write(version. versionBytes$profgen)
330+ version. write$profgen(it, sortedData, " " )
331+ }
332+ }
333+ }
334+ }
335+ }
0 commit comments