Skip to content

Commit 71d797b

Browse files
committed
Change the build
1 parent 5d573fb commit 71d797b

File tree

11 files changed

+138
-149
lines changed

11 files changed

+138
-149
lines changed

build.gradle.kts

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
6-
dependencies {
7-
classpath(kotlin("gradle-plugin", version = "1.9.20"))
8-
classpath("com.android.tools.build:gradle:8.7.2")
9-
classpath("com.vanniktech:gradle-maven-publish-plugin:0.19.0")
10-
}
11-
}
12-
13-
allprojects {
14-
repositories {
15-
google()
16-
mavenCentral()
17-
}
1+
plugins {
2+
alias(libs.plugins.com.android.application) apply false
3+
alias(libs.plugins.com.android.library) apply false
4+
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
5+
alias(libs.plugins.maven.publish) apply false
186
}

buildSrc/build.gradle.kts

Lines changed: 0 additions & 7 deletions
This file was deleted.

buildSrc/src/main/kotlin/Extensions.kt

Lines changed: 0 additions & 29 deletions
This file was deleted.

gradle.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ org.gradle.jvmargs=-Xmx4g
33
# AndroidX
44
android.useAndroidX=true
55

6-
# Config
7-
minSdk=21
8-
targetSdk=35
9-
coilVersion=3.0.0
10-
116
GROUP=com.commit451.coiltransformations
127
# Overwritten by CI
138
VERSION_NAME=0.0.1
@@ -28,5 +23,3 @@ POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/Commit451/coil-transformatio
2823
POM_DEVELOPER_ID=Commit451
2924
POM_DEVELOPER_NAME=Commit 451
3025
POM_DEVELOPER_URL=https://github.com/Commit451/
31-
32-
RELEASE_SIGNING_ENABLED=false

gradle/libs.versions.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[versions]
2+
agp = "8.7.2"
3+
constraintlayout = "2.2.0"
4+
coreKtx = "1.15.0"
5+
faceDetection = "16.1.7"
6+
gpuimage = "2.1.0"
7+
kotlin = "1.9.20"
8+
coil = "3.0.0"
9+
lifecycleExtensions = "2.2.0"
10+
lifecycleLivedataKtx = "2.8.7"
11+
material = "1.12.0"
12+
recyclerview = "1.3.2"
13+
14+
[libraries]
15+
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" }
16+
coil-core = { module = "io.coil-kt.coil3:coil-core", version.ref = "coil" }
17+
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
18+
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
19+
face-detection = { module = "com.google.mlkit:face-detection", version.ref = "faceDetection" }
20+
gpuimage = { module = "jp.co.cyberagent.android:gpuimage", version.ref = "gpuimage" }
21+
lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycleExtensions" }
22+
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
23+
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleLivedataKtx" }
24+
material = { module = "com.google.android.material:material", version.ref = "material" }
25+
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
26+
27+
28+
[plugins]
29+
com-android-application = { id = "com.android.application", version.ref = "agp" }
30+
com-android-library = { id = "com.android.library", version.ref = "agp" }
31+
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
32+
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }
33+
34+
[bundles]

publish.gradle

Lines changed: 0 additions & 5 deletions
This file was deleted.

sample/build.gradle.kts

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
import coiltransformations.coilVersion
2-
import coiltransformations.minSdk
3-
import coiltransformations.targetSdk
4-
51
plugins {
6-
id("com.android.application")
7-
id("kotlin-android")
2+
alias(libs.plugins.com.android.application)
3+
alias(libs.plugins.org.jetbrains.kotlin.android)
84
}
95

106
android {
117
namespace = "com.commit451.coiltransformations.sample"
12-
compileSdk = project.targetSdk
8+
compileSdk = 35
139
defaultConfig {
1410
applicationId = "com.commit451.coiltransformations.sample"
15-
minSdk = project.minSdk
16-
targetSdk = project.targetSdk
11+
minSdk = 21
12+
targetSdk = 35
1713
versionCode = 1
1814
versionName = "1.0.0"
1915
}
@@ -25,28 +21,23 @@ android {
2521
signingConfig = signingConfigs.getByName("debug")
2622
}
2723
}
28-
compileOptions {
29-
sourceCompatibility = JavaVersion.VERSION_17
30-
targetCompatibility = JavaVersion.VERSION_17
31-
}
32-
kotlinOptions {
33-
jvmTarget = JavaVersion.VERSION_17.toString()
34-
}
24+
}
25+
26+
kotlin {
27+
jvmToolchain(17)
3528
}
3629

3730
dependencies {
3831
implementation(project(":transformations"))
3932
implementation(project(":transformations-gpu"))
4033
implementation(project(":transformations-face-detection"))
41-
implementation("io.coil-kt.coil3:coil-compose:${project.coilVersion}")
34+
implementation(libs.coil.compose)
4235

43-
implementation("androidx.appcompat:appcompat:1.7.0")
44-
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
45-
implementation("androidx.core:core-ktx:1.15.0")
46-
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
47-
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")
48-
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
49-
implementation("androidx.recyclerview:recyclerview:1.3.2")
36+
implementation(libs.constraintlayout)
37+
implementation(libs.lifecycle.extensions)
38+
implementation(libs.lifecycle.livedata.ktx)
39+
implementation(libs.lifecycle.viewmodel.ktx)
40+
implementation(libs.recyclerview)
5041

51-
implementation("com.google.android.material:material:1.12.0")
42+
implementation(libs.material)
5243
}

settings.gradle.kts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
rootProject.buildFileName = "build.gradle.kts"
1+
pluginManagement {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
7+
}
8+
dependencyResolutionManagement {
9+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10+
repositories {
11+
google()
12+
mavenCentral()
13+
}
14+
}
15+
16+
rootProject.name = "coil-transformations"
217
include(
318
":transformations",
419
":transformations-face-detection",
520
":transformations-gpu",
6-
":sample"
21+
":sample",
722
)
Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
1-
import coiltransformations.coilVersion
2-
import coiltransformations.minSdk
3-
import coiltransformations.targetSdk
1+
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
42

53
plugins {
6-
id("com.android.library")
7-
id("kotlin-android")
4+
alias(libs.plugins.com.android.library)
5+
alias(libs.plugins.org.jetbrains.kotlin.android)
6+
alias(libs.plugins.maven.publish)
87
}
98

10-
apply(from = "../publish.gradle")
11-
129
android {
1310
namespace = "com.commit451.coiltransformations.facedetection"
14-
compileSdk = project.targetSdk
11+
compileSdk = 35
1512
defaultConfig {
16-
minSdk = project.minSdk
17-
targetSdk = project.targetSdk
13+
minSdk = 21
1814
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1915
}
20-
compileOptions {
21-
sourceCompatibility = JavaVersion.VERSION_17
22-
targetCompatibility = JavaVersion.VERSION_17
23-
}
24-
kotlinOptions {
25-
jvmTarget = JavaVersion.VERSION_17.toString()
26-
}
16+
}
17+
18+
kotlin {
19+
jvmToolchain(17)
2720
}
2821

2922
dependencies {
30-
api("io.coil-kt.coil3:coil-core:${project.coilVersion}")
31-
api("com.google.mlkit:face-detection:16.1.7")
23+
api(libs.coil.core)
24+
api(libs.face.detection)
25+
}
26+
27+
mavenPublishing {
28+
configure(
29+
AndroidSingleVariantLibrary(
30+
variant = "release",
31+
sourcesJar = true,
32+
publishJavadocJar = true,
33+
)
34+
)
3235
}
Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
1-
import coiltransformations.coilVersion
2-
import coiltransformations.minSdk
3-
import coiltransformations.targetSdk
1+
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
42

53
plugins {
6-
id("com.android.library")
7-
id("kotlin-android")
4+
alias(libs.plugins.com.android.library)
5+
alias(libs.plugins.org.jetbrains.kotlin.android)
6+
alias(libs.plugins.maven.publish)
87
}
98

10-
apply(from = "../publish.gradle")
11-
129
android {
1310
namespace = "com.commit451.coiltransformations.gpu"
14-
compileSdk = project.targetSdk
11+
compileSdk = 35
1512
defaultConfig {
16-
minSdk = project.minSdk
17-
targetSdk = project.targetSdk
13+
minSdk = 21
1814
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1915
}
20-
compileOptions {
21-
sourceCompatibility = JavaVersion.VERSION_17
22-
targetCompatibility = JavaVersion.VERSION_17
23-
}
24-
kotlinOptions {
25-
jvmTarget = JavaVersion.VERSION_17.toString()
26-
}
16+
}
17+
18+
kotlin {
19+
jvmToolchain(17)
2720
}
2821

2922
dependencies {
30-
api("io.coil-kt.coil3:coil-core:${project.coilVersion}")
31-
api("jp.co.cyberagent.android:gpuimage:2.1.0")
23+
api(libs.coil.core)
24+
api(libs.gpuimage)
25+
}
26+
27+
mavenPublishing {
28+
configure(
29+
AndroidSingleVariantLibrary(
30+
variant = "release",
31+
sourcesJar = true,
32+
publishJavadocJar = true,
33+
)
34+
)
3235
}

0 commit comments

Comments
 (0)