From fb8b92881142ee3eba5b7bb9a87e2abbf1a2f6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Latorre?= Date: Wed, 10 Dec 2025 07:50:20 +0100 Subject: [PATCH 1/3] Add licenses --- .../androidsnaptesting/screenshots/BitmapImage.kt | 14 ++++++++++++++ .../screenshots/ResultValidator.kt | 14 ++++++++++++++ .../androidsnaptesting/screenshots/ViewUtils.kt | 14 ++++++++++++++ .../screenshots/WriteDiffImage.kt | 14 ++++++++++++++ 4 files changed, 56 insertions(+) diff --git a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/BitmapImage.kt b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/BitmapImage.kt index 0ecc390..bf56091 100644 --- a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/BitmapImage.kt +++ b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/BitmapImage.kt @@ -1,3 +1,17 @@ +/*Copyright (c) 2022 Dropbox, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + package com.telefonica.androidsnaptesting.screenshots import android.graphics.Bitmap diff --git a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ResultValidator.kt b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ResultValidator.kt index 8fff86c..750d209 100644 --- a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ResultValidator.kt +++ b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ResultValidator.kt @@ -1,3 +1,17 @@ +/*Copyright (c) 2022 Dropbox, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + package com.telefonica.androidsnaptesting.screenshots import com.dropbox.differ.ImageComparator diff --git a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ViewUtils.kt b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ViewUtils.kt index c58fa6f..95f0517 100644 --- a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ViewUtils.kt +++ b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ViewUtils.kt @@ -1,3 +1,17 @@ +/*Copyright (c) 2022 Pedro Vicente Gómez Sánchez + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + package com.telefonica.androidsnaptesting.screenshots import android.view.View diff --git a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/WriteDiffImage.kt b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/WriteDiffImage.kt index 5b65ed7..2ed150d 100644 --- a/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/WriteDiffImage.kt +++ b/android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/WriteDiffImage.kt @@ -1,3 +1,17 @@ +/*Copyright (c) 2022 Dropbox, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + package com.telefonica.androidsnaptesting.screenshots import android.graphics.Bitmap From 61581469f2496a1f24674ef88ae2123e0a750342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Latorre?= Date: Thu, 11 Dec 2025 09:58:36 +0100 Subject: [PATCH 2/3] Restore public publication --- .github/workflows/release.yml | 16 ++--- LICENSE | 2 +- include-build/build.gradle.kts | 3 - include-build/gradle-plugin/build.gradle.kts | 2 - include-build/gradle/libs.versions.toml | 2 - include-build/mavencentral.gradle | 64 -------------------- mavencentral.gradle | 12 +--- 7 files changed, 6 insertions(+), 95 deletions(-) delete mode 100644 include-build/mavencentral.gradle diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a75da12..a731d3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,9 +4,7 @@ on: types: [published] jobs: library: - runs-on: [ self-hosted-org, linux ] - container: - image: docker://docker.tuenti.io/android/novum_android:13 + runs-on: [ ubuntu-latest ] steps: - name: Checkout repo uses: actions/checkout@v4 @@ -18,14 +16,10 @@ jobs: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }} - NEXUS_USER: ${{ secrets.NEXUS_RELEASE_USER }} - NEXUS_PASS: ${{ secrets.NEXUS_RELEASE_PASSWORD }} run: | - ./gradlew publishReleasePublicationToMavenRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} + ./gradlew publishReleasePublicationToSonatypeRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} --max-workers 1 closeAndReleaseStagingRepository plugin: - runs-on: [ self-hosted-org, linux ] - container: - image: docker://docker.tuenti.io/android/novum_android:13 + runs-on: [ ubuntu-latest ] steps: - name: Checkout repo uses: actions/checkout@v4 @@ -34,8 +28,6 @@ jobs: env: GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} - NEXUS_USER: ${{ secrets.NEXUS_RELEASE_USER }} - NEXUS_PASS: ${{ secrets.NEXUS_RELEASE_PASSWORD }} run: | cd include-build - ../gradlew publishGradlePluginPublicationToMavenRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} \ No newline at end of file + ../gradlew publishPlugins -DLIBRARY_VERSION=${{ github.event.release.tag_name }} diff --git a/LICENSE b/LICENSE index f49a4e1..9985f57 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright [2025] [Telefónica] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/include-build/build.gradle.kts b/include-build/build.gradle.kts index 2c6e64d..7d2d7b7 100644 --- a/include-build/build.gradle.kts +++ b/include-build/build.gradle.kts @@ -1,7 +1,6 @@ plugins { alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.detekt) - alias(libs.plugins.publish) } allprojects { @@ -15,5 +14,3 @@ allprojects { buildUponDefaultConfig = true } } - -apply("${rootProject.projectDir}/../publish_maven_central.gradle") \ No newline at end of file diff --git a/include-build/gradle-plugin/build.gradle.kts b/include-build/gradle-plugin/build.gradle.kts index abd7f82..7fb061c 100644 --- a/include-build/gradle-plugin/build.gradle.kts +++ b/include-build/gradle-plugin/build.gradle.kts @@ -31,5 +31,3 @@ gradlePlugin { } } } - -apply("${rootProject.projectDir}/mavencentral.gradle") \ No newline at end of file diff --git a/include-build/gradle/libs.versions.toml b/include-build/gradle/libs.versions.toml index b343cbb..19319fc 100644 --- a/include-build/gradle/libs.versions.toml +++ b/include-build/gradle/libs.versions.toml @@ -5,7 +5,6 @@ ddmlib = "31.4.1" kotlin = "1.9.23" detekt = "1.23.6" publish-plugin = "1.2.0" -publish = "1.1.0" [libraries] android-builder-test-api = { module = "com.android.tools.build:builder-test-api", version.ref = "agp" } @@ -17,4 +16,3 @@ android-gradle = { module = "com.android.tools.build:gradle", version.ref = "agp detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } publish-plugin = { id = "com.gradle.plugin-publish", version.ref = "publish-plugin" } -publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "publish" } \ No newline at end of file diff --git a/include-build/mavencentral.gradle b/include-build/mavencentral.gradle deleted file mode 100644 index 512f718..0000000 --- a/include-build/mavencentral.gradle +++ /dev/null @@ -1,64 +0,0 @@ -apply plugin: 'maven-publish' -apply plugin: 'signing' - -publishing { - repositories { - maven { - credentials { - username System.env.NEXUS_USER - password System.env.NEXUS_PASS - } - def releasesRepoUrl = "https://nexusng.tuenti.io/repository/maven-release-private/" - def snapshotsRepoUrl = "https://nexusng.tuenti.io/repository/maven-snapshot-private/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - } - } - publications { - gradlePlugin(MavenPublication) { - groupId 'com.telefonica' - artifactId 'android-snaptesting-gradle-plugin' - version version - - artifact("$buildDir/libs/gradle-plugin-${version}.jar") - - pom { - name = 'Android Snaptesting Gradle Plugin' - description = 'Gradle Plugin for logs snapshot testing for Android Instrumentation tests.' - url = 'https://github.com/Telefonica/android-snaptesting' - licenses { - license { - name = 'The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id = 'android-team-telefonica' - name = 'Android Team' - email = 'cto-android@telefonica.com' - } - } - scm { - connection = 'scm:git:github.com/Telefonica/android-snaptesting.git' - developerConnection = 'scm:git:ssh://github.com/Telefonica/android-snaptesting.git' - url = 'https://github.com/Telefonica/android-snaptesting/tree/main' - } - withXml { - def dependenciesNode = asNode().appendNode('dependencies') - - project.configurations.getByName("implementation").dependencies.each { - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', it.group) - dependencyNode.appendNode('artifactId', it.name) - dependencyNode.appendNode('version', it.version) - } - } - } - } - } -} - -afterEvaluate { - tasks.getByName("publishGradlePluginPublicationToMavenLocal").dependsOn("jar") - tasks.getByName("publishGradlePluginPublicationToMavenRepository").dependsOn("jar") -} diff --git a/mavencentral.gradle b/mavencentral.gradle index d940def..35239cb 100644 --- a/mavencentral.gradle +++ b/mavencentral.gradle @@ -11,17 +11,6 @@ apply plugin: 'maven-publish' apply plugin: 'signing' publishing { - repositories { - maven { - credentials { - username System.env.NEXUS_USER - password System.env.NEXUS_PASS - } - def releasesRepoUrl = "https://nexusng.tuenti.io/repository/maven-release-private/" - def snapshotsRepoUrl = "https://nexusng.tuenti.io/repository/maven-snapshot-private/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - } - } publications { release(MavenPublication) { groupId 'com.telefonica' @@ -70,6 +59,7 @@ publishing { afterEvaluate { tasks.getByName("publishReleasePublicationToMavenLocal").dependsOn("assembleRelease") + tasks.getByName("publishReleasePublicationToSonatypeRepository").dependsOn("assembleRelease") tasks.getByName("signReleasePublication").dependsOn("assembleRelease") } From ecb1fe0f1bd4e35782777015e094e1fea7549396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Latorre?= Date: Thu, 11 Dec 2025 10:09:47 +0100 Subject: [PATCH 3/3] Run preintegration and snapshot in ubuntu-latest --- .github/workflows/preintegration.yml | 4 +--- .github/workflows/snapshot.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preintegration.yml b/.github/workflows/preintegration.yml index d46e0b8..e1464d8 100644 --- a/.github/workflows/preintegration.yml +++ b/.github/workflows/preintegration.yml @@ -9,9 +9,7 @@ concurrency: jobs: tests: - runs-on: [ self-hosted-org, linux ] - container: - image: docker://docker.tuenti.io/android/novum_android:13 + runs-on: [ ubuntu-latest ] steps: - name: Checkout repo uses: actions/checkout@v4 diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index de0d22a..6c37c77 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -7,9 +7,7 @@ on: required: true jobs: library: - runs-on: [ self-hosted-org, linux ] - container: - image: docker://docker.tuenti.io/android/novum_android:13 + runs-on: [ ubuntu-latest ] steps: - name: Checkout repo uses: actions/checkout@v4