Skip to content

Commit 4097614

Browse files
committed
refactor gradle
1 parent 37111cc commit 4097614

12 files changed

Lines changed: 40 additions & 43 deletions

File tree

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
applicationId = "com.pedro.streamer"
1212
minSdk = 16
1313
targetSdk = 36
14-
versionCode = libs.versions.versionCode.get().toInt()
15-
versionName = libs.versions.versionName.get()
14+
versionCode = project.version.toString().replace(".", "").toInt()
15+
versionName = project.version.toString()
1616
multiDexEnabled = true
1717
}
1818
buildTypes {

build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
allprojects {
2+
group = "com.github.pedroSG94"
3+
version = "2.6.2"
4+
}
25

36
plugins {
47
alias(libs.plugins.android.application) apply false

common/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.jetbrains.kotlin)
4-
id(libs.plugins.maven.publish.get().pluginId)
54
alias(libs.plugins.jetbrains.dokka)
5+
`maven-publish`
66
}
77

88
android {
@@ -40,9 +40,9 @@ afterEvaluate {
4040
from(components["release"])
4141

4242
// You can then customize attributes of the publication as shown below.
43-
groupId = libs.versions.libraryGroup.get()
44-
artifactId = "common"
45-
version = libs.versions.versionName.get()
43+
groupId = project.group.toString()
44+
artifactId = project.name
45+
version = project.version.toString()
4646
}
4747
}
4848
}

encoder/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.jetbrains.kotlin)
4-
id(libs.plugins.maven.publish.get().pluginId)
54
alias(libs.plugins.jetbrains.dokka)
5+
`maven-publish`
66
}
77

88
android {
@@ -42,9 +42,9 @@ afterEvaluate {
4242
from(components["release"])
4343

4444
// You can then customize attributes of the publication as shown below.
45-
groupId = libs.versions.libraryGroup.get()
46-
artifactId = "encoder"
47-
version = libs.versions.versionName.get()
45+
groupId = project.group.toString()
46+
artifactId = project.name
47+
version = project.version.toString()
4848
}
4949
}
5050
}

extra-sources/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.jetbrains.kotlin)
4-
id(libs.plugins.maven.publish.get().pluginId)
54
alias(libs.plugins.jetbrains.dokka)
5+
`maven-publish`
66
}
77

88
android {
@@ -39,9 +39,9 @@ afterEvaluate {
3939
from(components["release"])
4040

4141
// You can then customize attributes of the publication as shown below.
42-
groupId = libs.versions.libraryGroup.get()
43-
artifactId = "extra-sources"
44-
version = libs.versions.versionName.get()
42+
groupId = project.group.toString()
43+
artifactId = project.name
44+
version = project.version.toString()
4545
}
4646
}
4747
}

gradle/libs.versions.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
[versions]
2-
libraryGroup = "com.github.pedroSG94"
3-
versionCode = "262"
4-
versionName = "2.6.2"
5-
62
#plugins versions
7-
agp = "8.11.1"
3+
agp = "8.12.0"
84
kotlin = "2.2.0"
95
dokka = "2.0.0"
106

@@ -43,7 +39,6 @@ androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", versi
4339
[plugins]
4440
android-application = { id = "com.android.application", version.ref = "agp" }
4541
android-library = { id = "com.android.library", version.ref = "agp" }
46-
maven-publish = { id = "maven-publish", version.ref = "agp" }
4742
jetbrains-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
4843
jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
4944

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu Jun 26 11:05:20 CEST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

library/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.jetbrains.kotlin)
4-
id(libs.plugins.maven.publish.get().pluginId)
54
alias(libs.plugins.jetbrains.dokka)
5+
`maven-publish`
66
}
77

88
android {
@@ -39,9 +39,9 @@ afterEvaluate {
3939
from(components["release"])
4040

4141
// You can then customize attributes of the publication as shown below.
42-
groupId = libs.versions.libraryGroup.get()
43-
artifactId = "library"
44-
version = libs.versions.versionName.get()
42+
groupId = project.group.toString()
43+
artifactId = project.name
44+
version = project.version.toString()
4545
}
4646
}
4747
}

rtmp/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.jetbrains.kotlin)
4-
id(libs.plugins.maven.publish.get().pluginId)
54
alias(libs.plugins.jetbrains.dokka)
5+
`maven-publish`
66
}
77

88
android {
@@ -39,9 +39,9 @@ afterEvaluate {
3939
from(components["release"])
4040

4141
// You can then customize attributes of the publication as shown below.
42-
groupId = libs.versions.libraryGroup.get()
43-
artifactId = "rtmp"
44-
version = libs.versions.versionName.get()
42+
groupId = project.group.toString()
43+
artifactId = project.name
44+
version = project.version.toString()
4545
}
4646
}
4747
}

rtsp/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.jetbrains.kotlin)
4-
id(libs.plugins.maven.publish.get().pluginId)
54
alias(libs.plugins.jetbrains.dokka)
5+
`maven-publish`
66
}
77

88
android {
@@ -43,9 +43,9 @@ afterEvaluate {
4343
from(components["release"])
4444

4545
// You can then customize attributes of the publication as shown below.
46-
groupId = libs.versions.libraryGroup.get()
47-
artifactId = "rtsp"
48-
version = libs.versions.versionName.get()
46+
groupId = project.group.toString()
47+
artifactId = project.name
48+
version = project.version.toString()
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)