From 21af2d2765833e7c8dbf9e54d219c0aa6f0e29ec Mon Sep 17 00:00:00 2001 From: Sangwook123 Date: Tue, 2 Apr 2024 23:43:23 +0900 Subject: [PATCH] [feat] #1 build plugin gradle --- build-logic/convention/.gitignore | 1 + build-logic/convention/build.gradle.kts | 45 +++++++++++++++++++++++++ build-logic/settings.gradle.kts | 14 ++++++++ 3 files changed, 60 insertions(+) create mode 100644 build-logic/convention/.gitignore create mode 100644 build-logic/convention/build.gradle.kts create mode 100644 build-logic/settings.gradle.kts diff --git a/build-logic/convention/.gitignore b/build-logic/convention/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/build-logic/convention/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts new file mode 100644 index 0000000..753c09f --- /dev/null +++ b/build-logic/convention/build.gradle.kts @@ -0,0 +1,45 @@ +plugins { + `kotlin-dsl` +} + +group = "org.sopt.convention" + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +dependencies { + compileOnly(libs.android.gradle.plugin) + compileOnly(libs.kotlin.gradle.plugin) + compileOnly(libs.ksp.gradle.plugin) +} + +gradlePlugin { + plugins { + register("androidApplication") { + id = "sopt.android.application" + implementationClass = "AndroidApplicationPlugin" + } + + register("androidLibrary") { + id = "sopt.android.library" + implementationClass = "AndroidLibraryPlugin" + } + + register("androidHilt") { + id = "sopt.android.hilt" + implementationClass = "HiltPlugin" + } + + register("javaLibrary") { + id = "sopt.java.library" + implementationClass = "JavaLibraryPlugin" + } + + register("FeaturePlugin") { + id = "sopt.plugin.feature" + implementationClass = "FeaturePlugin" + } + } +} \ No newline at end of file diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 0000000..6225785 --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,14 @@ +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +rootProject.name = "build-logic" +include(":convention") \ No newline at end of file