From 4ee03cb8dd85741d4b51ee54eb7edc39fabaf7b1 Mon Sep 17 00:00:00 2001 From: Nikita Evdokimov Date: Thu, 24 Aug 2023 16:59:17 +0300 Subject: [PATCH 1/2] TECH: Moved legal documents copying to convention --- allure-support/build.gradle.kts | 10 ---------- .../convention.publication-android-lib.gradle.kts | 10 ++++++++++ .../convention.publication-kotlin-lib.gradle.kts | 11 +++++++++++ compose-support/build.gradle.kts | 10 ---------- kaspresso/build.gradle.kts | 10 ---------- kautomator/build.gradle.kts | 10 ---------- 6 files changed, 21 insertions(+), 40 deletions(-) diff --git a/allure-support/build.gradle.kts b/allure-support/build.gradle.kts index 6e5b24bc9..dac03c48a 100644 --- a/allure-support/build.gradle.kts +++ b/allure-support/build.gradle.kts @@ -5,16 +5,6 @@ plugins { id("convention.legal-documents") } -// TODO: move to publishing convention -android { - libraryVariants.configureEach { - packageLibraryProvider.configure { - from("$rootDir/LICENSE.txt") - from("NOTICE.txt") - } - } -} - publish { artifactId.set("kaspresso-allure-support") } diff --git a/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts b/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts index 0234df9ac..3144384eb 100644 --- a/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts +++ b/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts @@ -2,6 +2,7 @@ import com.android.build.gradle.LibraryExtension import com.kaspersky.kaspresso.publication.KotlinLibraryPublishExtension plugins { + id("com.android.library") id("convention.publication-base") } @@ -26,3 +27,12 @@ publishing { } } } + +android { + libraryVariants.configureEach { + packageLibraryProvider.configure { + from("$rootDir/LICENSE.txt") + from("NOTICE.txt") + } + } +} \ No newline at end of file diff --git a/build-logic/publication/src/main/kotlin/convention.publication-kotlin-lib.gradle.kts b/build-logic/publication/src/main/kotlin/convention.publication-kotlin-lib.gradle.kts index 4116a366c..8dc06f1d1 100644 --- a/build-logic/publication/src/main/kotlin/convention.publication-kotlin-lib.gradle.kts +++ b/build-logic/publication/src/main/kotlin/convention.publication-kotlin-lib.gradle.kts @@ -2,6 +2,7 @@ import com.kaspersky.kaspresso.publication.KotlinLibraryPublishExtension plugins { id("convention.publication-base") + `java-library` } plugins.withId("kotlin") { @@ -25,3 +26,13 @@ publishing { } } } + +sourceSets { + main { + resources { + srcDirs(".", "$rootDir") + include("NOTICE.txt") + include("LICENSE.txt") + } + } +} diff --git a/compose-support/build.gradle.kts b/compose-support/build.gradle.kts index 469c66074..6218ed373 100644 --- a/compose-support/build.gradle.kts +++ b/compose-support/build.gradle.kts @@ -5,16 +5,6 @@ plugins { id("convention.legal-documents") } -// TODO: move to publishing convention -android { - libraryVariants.configureEach { - packageLibraryProvider.configure { - from("$rootDir/LICENSE.txt") - from("NOTICE.txt") - } - } -} - publish { artifactId.set("kaspresso-compose-support") } diff --git a/kaspresso/build.gradle.kts b/kaspresso/build.gradle.kts index 8bd1f3772..5f0640b2f 100644 --- a/kaspresso/build.gradle.kts +++ b/kaspresso/build.gradle.kts @@ -5,16 +5,6 @@ plugins { id("convention.legal-documents") } -// TODO: move to publishing convention -android { - libraryVariants.configureEach { - packageLibraryProvider.configure { - from("$rootDir/LICENSE.txt") - from("NOTICE.txt") - } - } -} - publish { artifactId.set("kaspresso") } diff --git a/kautomator/build.gradle.kts b/kautomator/build.gradle.kts index 7df1d0eef..936b5afa5 100644 --- a/kautomator/build.gradle.kts +++ b/kautomator/build.gradle.kts @@ -5,16 +5,6 @@ plugins { id("convention.legal-documents") } -// TODO: move to publishing convention -android { - libraryVariants.configureEach { - packageLibraryProvider.configure { - from("$rootDir/LICENSE.txt") - from("NOTICE.txt") - } - } -} - publish { artifactId.set("kautomator") } From 28d92c17c405ece19de335e04d5e2556ba7a95a2 Mon Sep 17 00:00:00 2001 From: Nikita Evdokimov Date: Thu, 24 Aug 2023 17:13:13 +0300 Subject: [PATCH 2/2] TECH: Lint --- .../main/kotlin/convention.publication-android-lib.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts b/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts index 3144384eb..7e99323a8 100644 --- a/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts +++ b/build-logic/publication/src/main/kotlin/convention.publication-android-lib.gradle.kts @@ -35,4 +35,4 @@ android { from("NOTICE.txt") } } -} \ No newline at end of file +}