Skip to content

Commit 743dbdb

Browse files
authored
Bump all libs + Made readLimited way faster (#8)
1 parent 2460805 commit 743dbdb

File tree

13 files changed

+335
-219
lines changed

13 files changed

+335
-219
lines changed

app/build.gradle

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
apply plugin: 'com.android.application'
24
apply plugin: 'kotlin-android'
35

46
android {
5-
compileSdkVersion 34
6-
buildToolsVersion "34.0.0"
7+
compileSdkVersion 36
8+
buildToolsVersion "35.0.0"
79

810
defaultConfig {
911
applicationId "com.lagradost.nicehttp.example"
10-
minSdkVersion 21
11-
targetSdkVersion 34
12+
minSdkVersion 23
13+
targetSdkVersion 36
1214
versionCode 1
1315
versionName '0.1.0'
1416
}
@@ -24,23 +26,32 @@ android {
2426
sourceCompatibility JavaVersion.VERSION_1_8
2527
targetCompatibility JavaVersion.VERSION_1_8
2628
}
29+
30+
kotlin {
31+
compilerOptions {
32+
jvmTarget = JvmTarget.JVM_1_8
33+
}
34+
}
35+
36+
namespace = "com.lagradost.nicehttp.example"
2737
}
2838

2939
dependencies {
3040
implementation project(':library')
31-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
41+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21"
3242

33-
implementation 'androidx.core:core-ktx:1.12.0'
34-
implementation 'androidx.appcompat:appcompat:1.6.1'
35-
implementation 'com.google.android.material:material:1.11.0'
36-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
37-
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
43+
implementation 'androidx.core:core-ktx:1.17.0'
44+
implementation 'androidx.appcompat:appcompat:1.7.1'
45+
implementation 'com.google.android.material:material:1.13.0'
46+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
47+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0'
3848

3949
/** Do not update to 2.13.2 it breaks compatibility with android < 24 !!! */
50+
//noinspection NewerVersionAvailable
4051
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1"
4152

4253
// compileOnly 'androidx.annotation:annotation:1.3.0'
4354
}
4455
repositories {
4556
mavenCentral()
46-
}
57+
}

app/src/main/java/com/lagradost/nicehttp/example/MainActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.lagradost.nicehttp.example
22

33
import android.os.Bundle
4+
import android.widget.TextView
45
import androidx.appcompat.app.AppCompatActivity
56
import com.fasterxml.jackson.annotation.JsonProperty
67
import com.fasterxml.jackson.databind.DeserializationFeature
@@ -63,6 +64,10 @@ class MainActivity : AppCompatActivity() {
6364
.parsed<GithubJson>()
6465
println("JSON description: ${json.description}")
6566

67+
runOnUiThread {
68+
findViewById<TextView?>(R.id.textView)?.text = json.description
69+
}
70+
6671
// Example for Async-ed Requests
6772
(0..3).toList().asyncMap {
6873
println("Entered Async")

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
tools:context=".MainActivity">
88

99
<TextView
10+
android:id="@+id/textView"
1011
android:layout_width="wrap_content"
1112
android:layout_height="wrap_content"
1213
android:text="Hello World!"
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = "1.9.22"
54
repositories {
65
mavenCentral()
76
google()
87
}
98
dependencies {
10-
classpath 'com.android.tools.build:gradle:7.2.2'
11-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
9+
classpath("com.android.tools.build:gradle:8.13.1")
10+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.21")
1211

1312
// NOTE: Do not place your application dependencies here; they belong
1413
// in the individual module build.gradle files
@@ -20,8 +19,13 @@ allprojects {
2019
mavenCentral()
2120
google()
2221
}
22+
23+
// https://docs.gradle.org/current/userguide/upgrading_major_version_9.html#test_task_fails_when_no_tests_are_discovered
24+
tasks.withType<AbstractTestTask>().configureEach {
25+
failOnNoDiscoveredTests = false
26+
}
2327
}
2428

25-
task clean(type: Delete) {
26-
delete rootProject.buildDir
27-
}
29+
//task.clean(type: Delete) {
30+
// delete rootProject.buildDir
31+
//}

cli/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
plugins {
24
// id 'java-library'
35
id 'org.jetbrains.kotlin.jvm'
@@ -7,11 +9,19 @@ java {
79
sourceCompatibility = JavaVersion.VERSION_1_8
810
targetCompatibility = JavaVersion.VERSION_1_8
911
}
12+
13+
kotlin {
14+
compilerOptions {
15+
jvmTarget = JvmTarget.JVM_1_8
16+
}
17+
}
18+
1019
repositories {
1120
maven { url 'https://jitpack.io' }
1221
}
1322

1423
dependencies {
1524
implementation project(':library')
25+
//noinspection NewerVersionAvailable
1626
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1"
1727
}

gradle/wrapper/gradle-wrapper.jar

-13.9 KB
Binary file not shown.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
3+
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
5+
networkTimeout=10000
6+
validateDistributionUrl=true
47
zipStoreBase=GRADLE_USER_HOME
58
zipStorePath=wrapper/dists

gradlew

Lines changed: 32 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)