Skip to content

Commit

Permalink
Change the build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawnnypoo committed Nov 8, 2024
1 parent 5d573fb commit 71d797b
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 149 deletions.
22 changes: 5 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(kotlin("gradle-plugin", version = "1.9.20"))
classpath("com.android.tools.build:gradle:8.7.2")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.19.0")
}
}

allprojects {
repositories {
google()
mavenCentral()
}
plugins {
alias(libs.plugins.com.android.application) apply false
alias(libs.plugins.com.android.library) apply false
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
alias(libs.plugins.maven.publish) apply false
}
7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

29 changes: 0 additions & 29 deletions buildSrc/src/main/kotlin/Extensions.kt

This file was deleted.

7 changes: 0 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ org.gradle.jvmargs=-Xmx4g
# AndroidX
android.useAndroidX=true

# Config
minSdk=21
targetSdk=35
coilVersion=3.0.0

GROUP=com.commit451.coiltransformations
# Overwritten by CI
VERSION_NAME=0.0.1
Expand All @@ -28,5 +23,3 @@ POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/Commit451/coil-transformatio
POM_DEVELOPER_ID=Commit451
POM_DEVELOPER_NAME=Commit 451
POM_DEVELOPER_URL=https://github.com/Commit451/

RELEASE_SIGNING_ENABLED=false
34 changes: 34 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[versions]
agp = "8.7.2"
constraintlayout = "2.2.0"
coreKtx = "1.15.0"
faceDetection = "16.1.7"
gpuimage = "2.1.0"
kotlin = "1.9.20"
coil = "3.0.0"
lifecycleExtensions = "2.2.0"
lifecycleLivedataKtx = "2.8.7"
material = "1.12.0"
recyclerview = "1.3.2"

[libraries]
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" }
coil-core = { module = "io.coil-kt.coil3:coil-core", version.ref = "coil" }
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
face-detection = { module = "com.google.mlkit:face-detection", version.ref = "faceDetection" }
gpuimage = { module = "jp.co.cyberagent.android:gpuimage", version.ref = "gpuimage" }
lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycleExtensions" }
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleLivedataKtx" }
material = { module = "com.google.android.material:material", version.ref = "material" }
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }


[plugins]
com-android-application = { id = "com.android.application", version.ref = "agp" }
com-android-library = { id = "com.android.library", version.ref = "agp" }
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }

[bundles]
5 changes: 0 additions & 5 deletions publish.gradle

This file was deleted.

41 changes: 16 additions & 25 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import coiltransformations.coilVersion
import coiltransformations.minSdk
import coiltransformations.targetSdk

plugins {
id("com.android.application")
id("kotlin-android")
alias(libs.plugins.com.android.application)
alias(libs.plugins.org.jetbrains.kotlin.android)
}

android {
namespace = "com.commit451.coiltransformations.sample"
compileSdk = project.targetSdk
compileSdk = 35
defaultConfig {
applicationId = "com.commit451.coiltransformations.sample"
minSdk = project.minSdk
targetSdk = project.targetSdk
minSdk = 21
targetSdk = 35
versionCode = 1
versionName = "1.0.0"
}
Expand All @@ -25,28 +21,23 @@ android {
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

kotlin {
jvmToolchain(17)
}

dependencies {
implementation(project(":transformations"))
implementation(project(":transformations-gpu"))
implementation(project(":transformations-face-detection"))
implementation("io.coil-kt.coil3:coil-compose:${project.coilVersion}")
implementation(libs.coil.compose)

implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation(libs.constraintlayout)
implementation(libs.lifecycle.extensions)
implementation(libs.lifecycle.livedata.ktx)
implementation(libs.lifecycle.viewmodel.ktx)
implementation(libs.recyclerview)

implementation("com.google.android.material:material:1.12.0")
implementation(libs.material)
}
19 changes: 17 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
rootProject.buildFileName = "build.gradle.kts"
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "coil-transformations"
include(
":transformations",
":transformations-face-detection",
":transformations-gpu",
":sample"
":sample",
)
41 changes: 22 additions & 19 deletions transformations-face-detection/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
import coiltransformations.coilVersion
import coiltransformations.minSdk
import coiltransformations.targetSdk
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary

plugins {
id("com.android.library")
id("kotlin-android")
alias(libs.plugins.com.android.library)
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.maven.publish)
}

apply(from = "../publish.gradle")

android {
namespace = "com.commit451.coiltransformations.facedetection"
compileSdk = project.targetSdk
compileSdk = 35
defaultConfig {
minSdk = project.minSdk
targetSdk = project.targetSdk
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

kotlin {
jvmToolchain(17)
}

dependencies {
api("io.coil-kt.coil3:coil-core:${project.coilVersion}")
api("com.google.mlkit:face-detection:16.1.7")
api(libs.coil.core)
api(libs.face.detection)
}

mavenPublishing {
configure(
AndroidSingleVariantLibrary(
variant = "release",
sourcesJar = true,
publishJavadocJar = true,
)
)
}
41 changes: 22 additions & 19 deletions transformations-gpu/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
import coiltransformations.coilVersion
import coiltransformations.minSdk
import coiltransformations.targetSdk
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary

plugins {
id("com.android.library")
id("kotlin-android")
alias(libs.plugins.com.android.library)
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.maven.publish)
}

apply(from = "../publish.gradle")

android {
namespace = "com.commit451.coiltransformations.gpu"
compileSdk = project.targetSdk
compileSdk = 35
defaultConfig {
minSdk = project.minSdk
targetSdk = project.targetSdk
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

kotlin {
jvmToolchain(17)
}

dependencies {
api("io.coil-kt.coil3:coil-core:${project.coilVersion}")
api("jp.co.cyberagent.android:gpuimage:2.1.0")
api(libs.coil.core)
api(libs.gpuimage)
}

mavenPublishing {
configure(
AndroidSingleVariantLibrary(
variant = "release",
sourcesJar = true,
publishJavadocJar = true,
)
)
}
41 changes: 22 additions & 19 deletions transformations/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
import coiltransformations.coilVersion
import coiltransformations.minSdk
import coiltransformations.targetSdk
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary

plugins {
id("com.android.library")
id("kotlin-android")
alias(libs.plugins.com.android.library)
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.maven.publish)
}

apply(from = "../publish.gradle")

android {
namespace = "com.commit451.coiltransformations"
compileSdk = project.targetSdk
compileSdk = 35
defaultConfig {
minSdk = project.minSdk
targetSdk = project.targetSdk
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

kotlin {
jvmToolchain(17)
}

dependencies {
api("io.coil-kt.coil3:coil-core:${project.coilVersion}")
api("androidx.core:core-ktx:1.15.0")
api(libs.coil.core)
api(libs.core.ktx)
}

mavenPublishing {
configure(
AndroidSingleVariantLibrary(
variant = "release",
sourcesJar = true,
publishJavadocJar = true,
)
)
}

0 comments on commit 71d797b

Please sign in to comment.