Skip to content

Commit

Permalink
chore(dependencies): upgrade dependencies and improve build variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Oct 13, 2023
1 parent 4e607b2 commit fcb1bd9
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 60 deletions.
42 changes: 16 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,33 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
// Livestream
versionCode = properties['VERSION_CODE'].toInteger()
versionName = "${properties['VERSION_NAME']}"
// SDK and tools
minSdk = 21
compileSdk = 34
targetSdk = 34

// Kotlin
kotlin_version = "1.6.10"
dokka_version = "1.6.10"
kotlinVersion = "1.8.22"
dokkaVersion = "1.8.20"

// SDK and tools
compileSdkVersion = 31
minSdkVersion = 21
targetSdkVersion = 31
// Example
versionCode = properties['VERSION_CODE'].toInteger()
versionName = "${properties['VERSION_NAME']}"

// StreamPack
streamPackVersion = "2.5.2"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
}
}

allprojects {
repositories {
google()
mavenCentral()
}
plugins {
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'org.jetbrains.kotlin.android' version "$kotlinVersion" apply false
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
33 changes: 17 additions & 16 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "video.api.livestream.example"
minSdkVersion 23
targetSdkVersion rootProject.targetSdkVersion

minSdk 23
targetSdk rootProject.targetSdk
compileSdk rootProject.compileSdk

versionCode rootProject.versionCode
versionName rootProject.versionName

Expand All @@ -38,17 +38,18 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.4'
implementation 'androidx.preference:preference-ktx:1.2.1'

implementation project(":livestream")

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Mar 30 13:54:51 CEST 2022
#Fri Oct 13 16:06:55 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
26 changes: 12 additions & 14 deletions livestream/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ apply from: 'maven-push.gradle'


android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
minSdk rootProject.minSdk
targetSdk rootProject.targetSdk
compileSdk rootProject.compileSdk

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -44,7 +42,7 @@ dokkaHtml {
}
}
pluginsMapConfiguration.set(
["org.jetbrains.dokka.base.DokkaBase": """{
["org.jetbrains.dokka.base.DokkaBase": """{
"customAssets" : [
"${file("$rootDir/docs/docs_logo.svg")}",
"${file("$rootDir/docs/logo-icon.svg")}"
Expand All @@ -54,14 +52,14 @@ dokkaHtml {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
api "io.github.thibaultbee:streampack:$streamPackVersion"
implementation "io.github.thibaultbee:streampack-extension-rtmp:$streamPackVersion"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
16 changes: 15 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "ApiVideoLiveStream"
include ':livestream'
include ':example'
rootProject.name = "live-stream"

0 comments on commit fcb1bd9

Please sign in to comment.