From e23f06faa3eb640f9744d2eb5b330cdd8424b141 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 02:48:59 +0800 Subject: [PATCH 01/10] Organize code and setup publishing --- .gitignore | 1 + .gitlab-ci.yml | 39 ----- app-sizer/build.gradle | 3 +- .../main/kotlin/com/grab/sizer/AppSizer.kt | 1 - build-logic/build.gradle.kts | 28 +-- build-logic/gradle.properties | 1 + build-logic/gradlew | 1 + build-logic/gradlew.bat | 1 + build-logic/settings.gradle.kts | 21 +++ .../BuildPlugin.kt} | 24 +-- .../kotlin/com/grab/sizer/gradle/Plugin.kt | 37 ++++ .../main/kotlin/com/grab/sizer/jvm/Kotlin.kt | 60 +++++++ .../kotlin/com/grab/sizer/jvm/KotlinPlugin.kt | 40 +++++ build.gradle | 12 +- cli/build.gradle | 2 +- constants.gradle | 31 ++++ gradle-plugin/build.gradle | 163 ------------------ gradle.properties | 5 +- gradle/libs.versions.toml | 5 + gradle/publishing.gradle | 39 ++--- settings.gradle | 5 +- sizer-gradle-plugin/build.gradle | 83 +++++++++ sizer-gradle-plugin/gradle | 1 + sizer-gradle-plugin/gradle.properties | 1 + sizer-gradle-plugin/gradlew | 1 + sizer-gradle-plugin/gradlew.bat | 1 + sizer-gradle-plugin/settings.gradle | 50 ++++++ .../plugin/sizer/AppSizePluginExtension.kt | 0 .../com/grab/plugin/sizer/AppSizerPlugin.kt | 0 .../com/grab/plugin/sizer/ProjectParams.kt | 0 .../com/grab/plugin/sizer/TaskManager.kt | 0 .../configuration/ApkGeneratorExtension.kt | 0 .../sizer/configuration/InputExtension.kt | 0 .../sizer/configuration/MetricExtension.kt | 0 .../sizer/dependencies/ArchiveDependency.kt | 0 .../dependencies/ArchiveDependencyManager.kt | 0 .../ArchiveDependencyTypeAdapter.kt | 0 .../sizer/dependencies/ArchiveExtractor.kt | 0 .../DefaultConfigurationExtractor.kt | 0 .../dependencies/DependenciesComponent.kt | 0 .../sizer/dependencies/DependencyExtractor.kt | 0 .../sizer/dependencies/VariantExtractor.kt | 0 .../plugin/sizer/tasks/AppSizeAnalysisTask.kt | 0 .../plugin/sizer/tasks/GenerateApkTask.kt | 0 .../sizer/tasks/GenerateArchivesListTask.kt | 0 .../com/grab/plugin/sizer/utils/Logger.kt | 0 .../plugin/sizer/utils/PluginInputProvider.kt | 0 .../sizer/utils/PluginOutputProvider.kt | 0 .../plugin/sizer/utils/ProjectExtensions.kt | 0 .../grab/plugin/sizer/AppSizerPluginTest.kt | 0 .../DefaultDependencyExtractorTest.kt | 0 .../DefaultVariantExtractorTest.kt | 0 .../sizer/dependencies/TestProjectCreator.kt | 0 .../plugin/sizer/fake/FakeConfiguration.kt | 0 .../plugin/sizer/fake/FakeDependencySet.kt | 0 .../sizer/fake/FakeResolvedConfiguration.kt | 0 .../com/grab/plugin/sizer/fake/MockLogger.kt | 0 .../com/grab/plugin/sizer/utils/Utils.kt | 0 58 files changed, 376 insertions(+), 280 deletions(-) delete mode 100644 .gitlab-ci.yml create mode 120000 build-logic/gradle.properties create mode 120000 build-logic/gradlew create mode 120000 build-logic/gradlew.bat create mode 100644 build-logic/settings.gradle.kts rename build-logic/src/main/kotlin/com/grab/sizer/{buildplugin/AppSizerConfigPlugin.kt => build/BuildPlugin.kt} (64%) create mode 100644 build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt create mode 100644 build-logic/src/main/kotlin/com/grab/sizer/jvm/Kotlin.kt create mode 100644 build-logic/src/main/kotlin/com/grab/sizer/jvm/KotlinPlugin.kt create mode 100644 constants.gradle delete mode 100644 gradle-plugin/build.gradle create mode 100644 sizer-gradle-plugin/build.gradle create mode 120000 sizer-gradle-plugin/gradle create mode 120000 sizer-gradle-plugin/gradle.properties create mode 120000 sizer-gradle-plugin/gradlew create mode 120000 sizer-gradle-plugin/gradlew.bat create mode 100644 sizer-gradle-plugin/settings.gradle rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/AppSizePluginExtension.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/AppSizerPlugin.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/ProjectParams.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/TaskManager.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/configuration/ApkGeneratorExtension.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/configuration/InputExtension.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/configuration/MetricExtension.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependency.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyManager.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyTypeAdapter.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveExtractor.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/DefaultConfigurationExtractor.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependenciesComponent.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependencyExtractor.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/dependencies/VariantExtractor.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/tasks/AppSizeAnalysisTask.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateApkTask.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateArchivesListTask.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/utils/Logger.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/utils/PluginInputProvider.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/utils/PluginOutputProvider.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/main/kotlin/com/grab/plugin/sizer/utils/ProjectExtensions.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/AppSizerPluginTest.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultDependencyExtractorTest.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultVariantExtractorTest.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/dependencies/TestProjectCreator.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/fake/FakeConfiguration.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/fake/FakeDependencySet.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/fake/FakeResolvedConfiguration.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/fake/MockLogger.kt (100%) rename {gradle-plugin => sizer-gradle-plugin}/src/test/kotlin/com/grab/plugin/sizer/utils/Utils.kt (100%) diff --git a/.gitignore b/.gitignore index 1ef9d7e..d698140 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ sample/.idea/* .DS_Store /build/ build/ +!**/src/**/build/ /captures diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index d87509f..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,39 +0,0 @@ -default: - image: gitlab.myteksi.net:4567/mobile/platform/mobile-tooling/base-android:34.0.0 - tags: - - 2xlarge -variables: - GRADLE_OPTS: "-Dorg.gradle.daemon=false" - -stages: - - build - - test - - publish - -build: - stage: build - script: - - ./gradlew assemble - artifacts: - paths: - - gradle-plugin/build/libs/*.jar - - cli/build/libs/*.jar - expire_in: 1 week - -test: - stage: test - script: - - ./gradlew test - -build_sample_app: - stage: test - script: - - cd ./sample - - ./gradlew app:appSizeAnalysisProRelease --stacktrace -Dorg.gradle.debug=false --no-daemon - -publish_artifact: - stage: build - rules: - - if: $RELEASE == "publish" - script: - - ./gradlew artifactoryPublish \ No newline at end of file diff --git a/app-sizer/build.gradle b/app-sizer/build.gradle index b2f26e3..9628edd 100644 --- a/app-sizer/build.gradle +++ b/app-sizer/build.gradle @@ -26,8 +26,9 @@ */ plugins { - id 'com.grab.sizer.kotlin' + id 'com.grab.sizer.build.kotlin' } +apply from: "../gradle/publishing.gradle" dependencies { /** diff --git a/app-sizer/src/main/kotlin/com/grab/sizer/AppSizer.kt b/app-sizer/src/main/kotlin/com/grab/sizer/AppSizer.kt index 16811cc..6a50553 100644 --- a/app-sizer/src/main/kotlin/com/grab/sizer/AppSizer.kt +++ b/app-sizer/src/main/kotlin/com/grab/sizer/AppSizer.kt @@ -68,6 +68,5 @@ class AppSizer( } } } - } } \ No newline at end of file diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 1bd0804..b35a057 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -30,31 +30,19 @@ plugins { `kotlin-dsl` } - -repositories { - google() - mavenCentral() - maven { - url = uri("https://plugins.gradle.org/m2/") - } - maven { - setUrl("https://artifacts.gitlab.myteksi.net/artifactory/mobile--android") - credentials { - username = System.getenv("READ_USER") - password = System.getenv("READ_PASSWORD") - } - } -} - dependencies { - implementation (libs.kotlin.gradle.plugin) + implementation(libs.kotlin.gradle.plugin) } gradlePlugin { plugins { - register("sizerKotlinBuildPlugin"){ - id = "com.grab.sizer.kotlin" - implementationClass = "com.grab.sizer.buildplugin.AppSizerConfigPlugin" + register("build") { + id = "com.grab.sizer.build.common" + implementationClass = "com.grab.sizer.build.BuildPlugin" + } + register("kotlin") { + id = "com.grab.sizer.build.kotlin" + implementationClass = "com.grab.sizer.jvm.KotlinPlugin" } } } \ No newline at end of file diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties new file mode 120000 index 0000000..7677fb7 --- /dev/null +++ b/build-logic/gradle.properties @@ -0,0 +1 @@ +../gradle.properties \ No newline at end of file diff --git a/build-logic/gradlew b/build-logic/gradlew new file mode 120000 index 0000000..502f5a2 --- /dev/null +++ b/build-logic/gradlew @@ -0,0 +1 @@ +../gradlew \ No newline at end of file diff --git a/build-logic/gradlew.bat b/build-logic/gradlew.bat new file mode 120000 index 0000000..2840132 --- /dev/null +++ b/build-logic/gradlew.bat @@ -0,0 +1 @@ +../gradlew.bat \ 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..af7efa3 --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,21 @@ +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +rootProject.name = "build-logic" diff --git a/build-logic/src/main/kotlin/com/grab/sizer/buildplugin/AppSizerConfigPlugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt similarity index 64% rename from build-logic/src/main/kotlin/com/grab/sizer/buildplugin/AppSizerConfigPlugin.kt rename to build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt index 604d6cf..2bfd9ec 100644 --- a/build-logic/src/main/kotlin/com/grab/sizer/buildplugin/AppSizerConfigPlugin.kt +++ b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt @@ -25,31 +25,15 @@ * SOFTWARE */ -package com.grab.sizer.buildplugin +package com.grab.sizer.build +import com.grab.sizer.gradle.ConfigurablePlugin import org.gradle.api.JavaVersion import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.compile.JavaCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -/** This plugin represents a build configuration - * of java-libraries/kotlin modules. - */ - -class AppSizerConfigPlugin : Plugin { - override fun apply(project: Project) { - project.plugins.apply("org.jetbrains.kotlin.jvm") - project.plugins.apply("org.jetbrains.kotlin.kapt") - project.version = if (System.getenv("CI") != null) "SNAPSHOT-08" else "SNAPSHOT" - - project.tasks.withType(KotlinCompile::class.java).forEach { - it.kotlinOptions.jvmTarget = "11" - } +class BuildPlugin : ConfigurablePlugin({ - project.tasks.withType(JavaCompile::class.java).configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() - } - } -} \ No newline at end of file +}) \ No newline at end of file diff --git a/build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt new file mode 100644 index 0000000..b22227d --- /dev/null +++ b/build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +package com.grab.sizer.gradle + +import org.gradle.api.Plugin +import org.gradle.api.Project + +open class ConfigurablePlugin( + private val configuration: Project.() -> Unit +) : Plugin { + override fun apply(project: Project): Unit = configuration(project) +} diff --git a/build-logic/src/main/kotlin/com/grab/sizer/jvm/Kotlin.kt b/build-logic/src/main/kotlin/com/grab/sizer/jvm/Kotlin.kt new file mode 100644 index 0000000..adb9824 --- /dev/null +++ b/build-logic/src/main/kotlin/com/grab/sizer/jvm/Kotlin.kt @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +package com.grab.sizer.jvm + +import org.gradle.api.Project +import org.gradle.kotlin.dsl.the +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions +import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion +import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask +import org.gradle.api.JavaVersion +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.kotlin.dsl.configure + +fun Project.javaCommon() { + configure { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } +} + +internal fun Project.kotlinCommon() { + the().apply { + jvmToolchain(17) + } + tasks.withType>().configureEach { + compilerOptions { + apiVersion.set(KotlinVersion.KOTLIN_1_8) + languageVersion.set(KotlinVersion.KOTLIN_1_8) + freeCompilerArgs.addAll() + } + } +} + diff --git a/build-logic/src/main/kotlin/com/grab/sizer/jvm/KotlinPlugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/jvm/KotlinPlugin.kt new file mode 100644 index 0000000..4baeeec --- /dev/null +++ b/build-logic/src/main/kotlin/com/grab/sizer/jvm/KotlinPlugin.kt @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +package com.grab.sizer.jvm + +import com.grab.sizer.gradle.ConfigurablePlugin +import org.gradle.api.plugins.JavaPlugin +import org.gradle.kotlin.dsl.apply + +class KotlinPlugin : ConfigurablePlugin({ + apply() + javaCommon() + apply(plugin = "org.jetbrains.kotlin.jvm") + apply(plugin = "org.jetbrains.kotlin.kapt") + kotlinCommon() +}) \ No newline at end of file diff --git a/build.gradle b/build.gradle index 66d41d9..0a7ee8f 100644 --- a/build.gradle +++ b/build.gradle @@ -24,19 +24,19 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE */ - buildscript { - repositories { - google() - mavenCentral() + apply from: "constants.gradle" + dependencies { + classpath libs.nexus.gradle.publish.plugin } } - plugins { + id "com.grab.sizer.build.common" alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.kotlin.kapt) apply false alias(libs.plugins.johnrengelman.shadow) apply false alias(libs.plugins.gradle.plugin.publish) apply false + alias(libs.plugins.dokka.gradle.plugin) apply false } - +apply from: "gradle/publish-root-config.gradle" diff --git a/cli/build.gradle b/cli/build.gradle index c713ce3..59cb701 100644 --- a/cli/build.gradle +++ b/cli/build.gradle @@ -26,7 +26,7 @@ */ plugins { - id "com.grab.sizer.kotlin" + id "com.grab.sizer.build.kotlin" id 'com.github.johnrengelman.shadow' } diff --git a/constants.gradle b/constants.gradle new file mode 100644 index 0000000..4c2f80a --- /dev/null +++ b/constants.gradle @@ -0,0 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +ext { + groupId = "com.grab.sizer" + versionName = project.hasProperty("versionName") ? versionName : "0.1.0-alpha01" +} \ No newline at end of file diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle deleted file mode 100644 index 79e853b..0000000 --- a/gradle-plugin/build.gradle +++ /dev/null @@ -1,163 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. - * - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE - */ - -/* - * This file was generated by the Gradle 'init' task. - * - * This generated file contains a sample Gradle plugin project to get you started. - * For more details take a look at the Writing Custom Plugins chapter in the Gradle - * User Manual available at https://docs.gradle.org/7.5.1/userguide/custom_plugins.html - * This project uses @Incubating APIs which are subject to change. - */ - -plugins { - id "com.grab.sizer.kotlin" - id 'java-gradle-plugin' - alias(libs.plugins.kotlin.dsl) - alias(libs.plugins.gradle.plugin.publish) - id 'maven-publish' - id 'signing' -} - -group = 'com.grab.sizer' -version = '1.0.0-SNAPSHOT' - -dependencies { - compileOnly libs.android.gradle.plugin - compileOnly libs.android.gradle.api - - implementation project(':app-sizer') - implementation libs.google.dagger - implementation libs.gson - kapt libs.dagger.compiler - - testImplementation libs.junit - testImplementation gradleTestKit() - testImplementation libs.android.gradle.plugin - testImplementation libs.android.gradle.api -} - -java { - withJavadocJar() - withSourcesJar() -} - -gradlePlugin { - website = 'https://grab.github.io/app-sizer/' - vcsUrl = 'https://github.com/grab/app-sizer.git' - - plugins { - appSizerPlugin { - id = 'com.grab.sizer' - implementationClass = 'com.grab.plugin.sizer.AppSizerPlugin' - displayName = 'App Sizer Plugin' - description = 'A tool designed to analyze the download size of Android applications' - tags.set(['android', 'size', 'analysis', 'app-size']) - } - } -} - -def configurePom(pom) { - pom.with { - name = 'App Sizer' - description = 'A tool designed to analyze the download size of Android applications' - url = 'https://github.com/grab/app-sizer' - - licenses { - license { - name = 'MIT License' - url = 'https://opensource.org/licenses/MIT' - distribution = 'repo' - } - } - - developers { - developer { - id = 'grab' - name = 'Grab Engineers' - email = 'van.minh@grab.com' - organization = 'Grab' - organizationUrl = 'https://github.com/grab' - } - } - - scm { - connection = 'scm:git:git://github.com/grab/app-sizer.git' - developerConnection = 'scm:git:ssh://github.com:grab/app-sizer.git' - url = 'https://github.com/grab/app-sizer' - } - } -} - -publishing { - publications.withType(MavenPublication).configureEach { publication -> - if (publication.name == 'pluginMaven') { - publication.artifactId = 'sizer-gradle-plugin' // Set the artifact ID - } - configurePom(publication.pom) - } - - repositories { - maven { - name = 'sonatype' - def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" - def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - - credentials { - username = findProperty('ossrhUsername') ?: System.getenv('OSSRH_USERNAME') - password = findProperty('ossrhPassword') ?: System.getenv('OSSRH_PASSWORD') - } - } - } -} - -signing { - def signingKey = findProperty('signingKey') ?: System.getenv('GPG_PRIVATE_KEY') - def signingPassword = findProperty('signingPassword') ?: System.getenv('GPG_PASSPHRASE') - - useInMemoryPgpKeys(signingKey, signingPassword) - sign publishing.publications -} - -// Fixed task ordering -tasks.withType(AbstractPublishToMaven).configureEach { publishTask -> - publishTask.mustRunAfter(tasks.withType(Sign)) -} - -tasks.withType(Sign).configureEach { signTask -> - signTask.onlyIf { !version.endsWith('SNAPSHOT') } - tasks.withType(AbstractPublishToMaven).forEach { - it.dependsOn(signTask) - } -} - -tasks.register('publishAll') { - group = 'publishing' - description = 'Publishes all publications to all repositories' - dependsOn(tasks.withType(AbstractPublishToMaven)) -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 8e69fc6..11f840b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,5 +24,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE # - +org.gradle.jvmargs=-Xmx4096m -Dkotlin.compiler.execution.strategy="in-process" +org.gradle.parallel=true +org.gradle.caching=true +# Kotlin code style kotlin.code.style=official diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 829c215..40a9cf9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,6 +14,8 @@ guava = "33.2.1-jre" gson = "2.10.1" influxdbClient = "2.24" shadow-jar = "7.0.0" +nexus = "1.1.0" +dokka = "1.9.20" # Tests junit = "4.13.2" @@ -35,6 +37,7 @@ jackson-dataformat-yaml = { module = "com.fasterxml.jackson.dataformat:jackson-d guava = { module = "com.google.guava:guava", version.ref = "guava" } gson = { module = "com.google.code.gson:gson", version.ref = "gson" } org-influxdb-client = { module = "org.influxdb:influxdb-java", version.ref = "influxdbClient" } +nexus-gradle-publish-plugin = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexus" } # Tests junit = { module = "junit:junit", version.ref = "junit" } @@ -45,3 +48,5 @@ gradle-plugin-publish = { id = "com.gradle.plugin-publish", version.ref = "gradl kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } johnrengelman-shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow-jar" } +dokka-gradle-plugin = { id = "org.jetbrains.dokka", version.ref = "dokka" } + diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index aea9f02..694ac27 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -38,10 +38,9 @@ artifacts { afterEvaluate { publishing { publications { - // Gradle plugin marker if it exists - named("grazelPluginPluginMarkerMaven") { publication -> - configurePom(publication) - } +// named("appSizerPluginPluginMarkerMaven") { publication -> +// configurePom(publication) +// } release(MavenPublication) { publication -> groupId project.findProperty("groupId") @@ -63,7 +62,7 @@ private void configurePom(MavenPublication publication) { publication.pom { name = project.name description = project.description - url = website + url = 'https://github.com/grab/app-sizer' licenses { license { name = "The MIT License" @@ -72,25 +71,17 @@ private void configurePom(MavenPublication publication) { } developers { developer { - id = "MinhNguyen-nvm" - name = "Minh Nguyen" - email = "minhnguyen.gtvt@gmail.com" - } - developer { - id = "arunkumar9t2" - name = "Arunkumar" - email = "hi@arunkumar.dev" - } - developer { - id = "minkuan88" - name = "Min Kuan Lim" - email = "minkuan88@hotmail.com" + id = 'grab' + name = 'Grab Engineers' + email = 'van.minh@grab.com' + organization = 'Grab' + organizationUrl = 'https://github.com/grab' } } scm { - connection = "git@github.com:grab/App-Sizer.git" - developerConnection = "git@github.com:grab/App-Sizer.git" - url = website + connection = 'scm:git:git://github.com/grab/app-sizer.git' + developerConnection = 'scm:git:ssh://github.com:grab/app-sizer.git' + url = 'https://github.com/grab/app-sizer' } } } @@ -98,9 +89,9 @@ private void configurePom(MavenPublication publication) { afterEvaluate { signing { useInMemoryPgpKeys( - rootProject.ext["signing.keyId"].toString(), - rootProject.ext["signing.key"].toString(), - rootProject.ext["signing.password"].toString(), + rootProject.ext["signing.keyId"].toString(), + rootProject.ext["signing.key"].toString(), + rootProject.ext["signing.password"].toString(), ) sign publishing.publications } diff --git a/settings.gradle b/settings.gradle index f3962ec..be329d6 100644 --- a/settings.gradle +++ b/settings.gradle @@ -31,9 +31,6 @@ pluginManagement { gradlePluginPortal() mavenCentral() google() - maven { - url = uri("https://plugins.gradle.org/m2/") - } } } @@ -48,6 +45,6 @@ dependencyResolutionManagement { rootProject.name = "app-sizer" include 'app-sizer' -include 'gradle-plugin' +include 'sizer-gradle-plugin' include 'cli' diff --git a/sizer-gradle-plugin/build.gradle b/sizer-gradle-plugin/build.gradle new file mode 100644 index 0000000..f64de9b --- /dev/null +++ b/sizer-gradle-plugin/build.gradle @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +/* + * This file was generated by the Gradle 'init' task. + * + * This generated file contains a sample Gradle plugin project to get you started. + * For more details take a look at the Writing Custom Plugins chapter in the Gradle + * User Manual available at https://docs.gradle.org/7.5.1/userguide/custom_plugins.html + * This project uses @Incubating APIs which are subject to change. + */ +buildscript { + apply from: "../constants.gradle" + dependencies { + classpath libs.nexus.gradle.publish.plugin + } +} + +plugins { + id "com.grab.sizer.build.common" + id "com.grab.sizer.build.kotlin" + id 'java-gradle-plugin' + alias(libs.plugins.dokka.gradle.plugin) + alias(libs.plugins.kotlin.dsl) + alias(libs.plugins.gradle.plugin.publish) + id 'maven-publish' + id 'signing' +} +apply from: "gradle/publishing.gradle" + +dependencies { + compileOnly libs.android.gradle.plugin + compileOnly libs.android.gradle.api + + implementation project(':app-sizer') + implementation libs.google.dagger + implementation libs.gson + kapt libs.dagger.compiler + + testImplementation libs.junit + testImplementation gradleTestKit() + testImplementation libs.android.gradle.plugin + testImplementation libs.android.gradle.api +} + +gradlePlugin { + website = 'https://grab.github.io/app-sizer/' + vcsUrl = 'https://github.com/grab/app-sizer.git' + + plugins { + appSizerPlugin { + id = 'com.grab.sizer' + implementationClass = 'com.grab.plugin.sizer.AppSizerPlugin' + displayName = 'App Sizer Plugin' + description = 'A tool designed to analyze the download size of Android applications' + tags.set(['android', 'size', 'analysis', 'app-size']) + } + } +} \ No newline at end of file diff --git a/sizer-gradle-plugin/gradle b/sizer-gradle-plugin/gradle new file mode 120000 index 0000000..3337596 --- /dev/null +++ b/sizer-gradle-plugin/gradle @@ -0,0 +1 @@ +../gradle \ No newline at end of file diff --git a/sizer-gradle-plugin/gradle.properties b/sizer-gradle-plugin/gradle.properties new file mode 120000 index 0000000..7677fb7 --- /dev/null +++ b/sizer-gradle-plugin/gradle.properties @@ -0,0 +1 @@ +../gradle.properties \ No newline at end of file diff --git a/sizer-gradle-plugin/gradlew b/sizer-gradle-plugin/gradlew new file mode 120000 index 0000000..502f5a2 --- /dev/null +++ b/sizer-gradle-plugin/gradlew @@ -0,0 +1 @@ +../gradlew \ No newline at end of file diff --git a/sizer-gradle-plugin/gradlew.bat b/sizer-gradle-plugin/gradlew.bat new file mode 120000 index 0000000..2840132 --- /dev/null +++ b/sizer-gradle-plugin/gradlew.bat @@ -0,0 +1 @@ +../gradlew.bat \ No newline at end of file diff --git a/sizer-gradle-plugin/settings.gradle b/sizer-gradle-plugin/settings.gradle new file mode 100644 index 0000000..47d6859 --- /dev/null +++ b/sizer-gradle-plugin/settings.gradle @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + includeBuild("../build-logic") { + setName("sizer-build-logic") + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +rootProject.name = "sizer-gradle-plugin" diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizePluginExtension.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizePluginExtension.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizePluginExtension.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizePluginExtension.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizerPlugin.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizerPlugin.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizerPlugin.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/AppSizerPlugin.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/ProjectParams.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/ProjectParams.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/ProjectParams.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/ProjectParams.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/TaskManager.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/TaskManager.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/TaskManager.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/TaskManager.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/ApkGeneratorExtension.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/ApkGeneratorExtension.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/ApkGeneratorExtension.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/ApkGeneratorExtension.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/InputExtension.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/InputExtension.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/InputExtension.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/InputExtension.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/MetricExtension.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/MetricExtension.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/MetricExtension.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/configuration/MetricExtension.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependency.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependency.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependency.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependency.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyManager.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyManager.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyManager.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyManager.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyTypeAdapter.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyTypeAdapter.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyTypeAdapter.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveDependencyTypeAdapter.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveExtractor.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveExtractor.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveExtractor.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/ArchiveExtractor.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DefaultConfigurationExtractor.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DefaultConfigurationExtractor.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DefaultConfigurationExtractor.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DefaultConfigurationExtractor.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependenciesComponent.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependenciesComponent.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependenciesComponent.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependenciesComponent.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependencyExtractor.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependencyExtractor.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependencyExtractor.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/DependencyExtractor.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/VariantExtractor.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/VariantExtractor.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/VariantExtractor.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/VariantExtractor.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/AppSizeAnalysisTask.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/AppSizeAnalysisTask.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/AppSizeAnalysisTask.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/AppSizeAnalysisTask.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateApkTask.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateApkTask.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateApkTask.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateApkTask.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateArchivesListTask.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateArchivesListTask.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateArchivesListTask.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/tasks/GenerateArchivesListTask.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/Logger.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/Logger.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/Logger.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/Logger.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginInputProvider.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginInputProvider.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginInputProvider.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginInputProvider.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginOutputProvider.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginOutputProvider.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginOutputProvider.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/PluginOutputProvider.kt diff --git a/gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/ProjectExtensions.kt b/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/ProjectExtensions.kt similarity index 100% rename from gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/ProjectExtensions.kt rename to sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/utils/ProjectExtensions.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/AppSizerPluginTest.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/AppSizerPluginTest.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/AppSizerPluginTest.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/AppSizerPluginTest.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultDependencyExtractorTest.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultDependencyExtractorTest.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultDependencyExtractorTest.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultDependencyExtractorTest.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultVariantExtractorTest.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultVariantExtractorTest.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultVariantExtractorTest.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/DefaultVariantExtractorTest.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/TestProjectCreator.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/TestProjectCreator.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/TestProjectCreator.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/dependencies/TestProjectCreator.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeConfiguration.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeConfiguration.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeConfiguration.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeConfiguration.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeDependencySet.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeDependencySet.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeDependencySet.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeDependencySet.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeResolvedConfiguration.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeResolvedConfiguration.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeResolvedConfiguration.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/FakeResolvedConfiguration.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/MockLogger.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/MockLogger.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/MockLogger.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/fake/MockLogger.kt diff --git a/gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/utils/Utils.kt b/sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/utils/Utils.kt similarity index 100% rename from gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/utils/Utils.kt rename to sizer-gradle-plugin/src/test/kotlin/com/grab/plugin/sizer/utils/Utils.kt From 49b687fc7b332904a25833a549c01902ada8a699 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 03:41:32 +0800 Subject: [PATCH 02/10] Fix publishing tasks --- app-sizer/build.gradle | 1 + .../com/grab/sizer/build/BuildPlugin.kt | 7 ++- gradle/libs.versions.toml | 2 +- gradle/publishing.gradle | 56 ++++++++++--------- sizer-gradle-plugin/build.gradle | 23 ++++---- sizer-gradle-plugin/settings.gradle | 50 ----------------- 6 files changed, 48 insertions(+), 91 deletions(-) delete mode 100644 sizer-gradle-plugin/settings.gradle diff --git a/app-sizer/build.gradle b/app-sizer/build.gradle index 9628edd..b1312f3 100644 --- a/app-sizer/build.gradle +++ b/app-sizer/build.gradle @@ -27,6 +27,7 @@ plugins { id 'com.grab.sizer.build.kotlin' + alias(libs.plugins.dokka.gradle.plugin) } apply from: "../gradle/publishing.gradle" diff --git a/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt index 2bfd9ec..b0e28d8 100644 --- a/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt +++ b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt @@ -35,5 +35,8 @@ import org.gradle.api.tasks.compile.JavaCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile class BuildPlugin : ConfigurablePlugin({ - -}) \ No newline at end of file + allprojects { + group = project.findProperty("groupId")!! + version = project.findProperty("versionName")!! + } +}) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 40a9cf9..12d5fcd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -gradle-plugin-publish = "1.2.1" +gradle-plugin-publish = "0.14.0" android-gradle-plugin = "8.5.1" kotlin = "1.9.22" kotlin-dsl = "4.3.1" diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 694ac27..ff838e2 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -35,30 +35,7 @@ artifacts { archives sourcesJar } -afterEvaluate { - publishing { - publications { -// named("appSizerPluginPluginMarkerMaven") { publication -> -// configurePom(publication) -// } - - release(MavenPublication) { publication -> - groupId project.findProperty("groupId") - artifactId project.name - version project.findProperty("versionName") - - from components.java - - artifact sourcesJar - artifact javadocJar - - configurePom(publication) - } - } - } -} - -private void configurePom(MavenPublication publication) { +def configurePom = { MavenPublication publication -> publication.pom { name = project.name description = project.description @@ -66,7 +43,7 @@ private void configurePom(MavenPublication publication) { licenses { license { name = "The MIT License" - url = "https://github.com/grab/App-Sizer/blob/master/LICENSE" + url = "hvttps://github.com/grab/App-Sizer/blob/master/LICENSE" } } developers { @@ -86,6 +63,33 @@ private void configurePom(MavenPublication publication) { } } +afterEvaluate { + publishing { + publications { + try { + named("appSizerPluginPluginMarkerMaven") { publication -> + print("ssss") + configurePom(publication) + } + } catch (UnknownDomainObjectException ignored) { + } + release(MavenPublication) { publication -> + groupId project.findProperty("groupId") + artifactId project.name + version project.findProperty("versionName") + + from components.java + + artifact sourcesJar + artifact javadocJar + + configurePom(publication) + } + } + } +} + + afterEvaluate { signing { useInMemoryPgpKeys( @@ -95,4 +99,4 @@ afterEvaluate { ) sign publishing.publications } -} \ No newline at end of file +} diff --git a/sizer-gradle-plugin/build.gradle b/sizer-gradle-plugin/build.gradle index f64de9b..acdc646 100644 --- a/sizer-gradle-plugin/build.gradle +++ b/sizer-gradle-plugin/build.gradle @@ -33,22 +33,11 @@ * User Manual available at https://docs.gradle.org/7.5.1/userguide/custom_plugins.html * This project uses @Incubating APIs which are subject to change. */ -buildscript { - apply from: "../constants.gradle" - dependencies { - classpath libs.nexus.gradle.publish.plugin - } -} - plugins { - id "com.grab.sizer.build.common" id "com.grab.sizer.build.kotlin" - id 'java-gradle-plugin' - alias(libs.plugins.dokka.gradle.plugin) alias(libs.plugins.kotlin.dsl) alias(libs.plugins.gradle.plugin.publish) - id 'maven-publish' - id 'signing' + id "maven-publish" } apply from: "gradle/publishing.gradle" @@ -67,6 +56,12 @@ dependencies { testImplementation libs.android.gradle.api } +pluginBundle { + mavenCoordinates { + groupId = project.group + artifactId = project.name + } +} gradlePlugin { website = 'https://grab.github.io/app-sizer/' vcsUrl = 'https://github.com/grab/app-sizer.git' @@ -80,4 +75,8 @@ gradlePlugin { tags.set(['android', 'size', 'analysis', 'app-size']) } } +} + +tasks.withType(AbstractPublishToMaven).configureEach { publishTask -> + publishTask.mustRunAfter(tasks.withType(Sign)) } \ No newline at end of file diff --git a/sizer-gradle-plugin/settings.gradle b/sizer-gradle-plugin/settings.gradle deleted file mode 100644 index 47d6859..0000000 --- a/sizer-gradle-plugin/settings.gradle +++ /dev/null @@ -1,50 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2024. Grabtaxi Holdings Pte Ltd (GRAB), All rights reserved. - * - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE - */ -pluginManagement { - repositories { - google() - mavenCentral() - gradlePluginPortal() - } - includeBuild("../build-logic") { - setName("sizer-build-logic") - } -} - -plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" -} - -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} -rootProject.name = "sizer-gradle-plugin" From a4a727ec37b51fdf947ae0066ad1256a936ebe80 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 03:43:24 +0800 Subject: [PATCH 03/10] Disable CI release job for now --- .github/workflows/release.yml | 90 +++++++++++++++++------------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f58cdd3..e762ed0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release App Sizer on: release: - types: [created] + types: [ created ] env: GRADLE_OPTS: "-Dorg.gradle.daemon=false" @@ -56,47 +56,47 @@ jobs: asset_name: app-sizer-cli-${{ env.VERSION }}.jar.sha256 asset_content_type: text/plain - release-plugin: - runs-on: ubuntu-latest - permissions: - contents: write - packages: write - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up JDK 11 - uses: actions/setup-java@v4 - with: - distribution: "zulu" - java-version: "11" - cache: 'gradle' - - - name: Get version - id: get_version - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - - name: Publish to Maven Central - env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - VERSION: ${{ env.VERSION }} - run: | - ./gradlew :gradle-plugin:publish \ - -Pversion=${VERSION} \ - --no-daemon \ - --no-parallel \ - --stacktrace \ No newline at end of file +# release-plugin: +# runs-on: ubuntu-latest +# permissions: +# contents: write +# packages: write +# +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# +# - name: Set up JDK 11 +# uses: actions/setup-java@v4 +# with: +# distribution: "zulu" +# java-version: "11" +# cache: 'gradle' +# +# - name: Get version +# id: get_version +# run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV +# +# - name: Import GPG key +# uses: crazy-max/ghaction-import-gpg@v5 +# with: +# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} +# passphrase: ${{ secrets.GPG_PASSPHRASE }} +# +# - name: Validate Gradle wrapper +# uses: gradle/wrapper-validation-action@v1 +# +# - name: Publish to Maven Central +# env: +# OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} +# OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} +# GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} +# GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} +# VERSION: ${{ env.VERSION }} +# run: | +# ./gradlew :gradle-plugin:publish \ +# -Pversion=${VERSION} \ +# --no-daemon \ +# --no-parallel \ +# --stacktrace \ No newline at end of file From 4059cc42b55e305cc7a39289c98fd99bbeabbbb4 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 03:48:19 +0800 Subject: [PATCH 04/10] Set project description --- .../src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt | 6 +----- sizer-gradle-plugin/build.gradle | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt index b0e28d8..40e95cb 100644 --- a/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt +++ b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt @@ -28,15 +28,11 @@ package com.grab.sizer.build import com.grab.sizer.gradle.ConfigurablePlugin -import org.gradle.api.JavaVersion -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.tasks.compile.JavaCompile -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile class BuildPlugin : ConfigurablePlugin({ allprojects { group = project.findProperty("groupId")!! version = project.findProperty("versionName")!! + description = "A tool designed to analyze the download size of Android applications" } }) diff --git a/sizer-gradle-plugin/build.gradle b/sizer-gradle-plugin/build.gradle index acdc646..9e0d094 100644 --- a/sizer-gradle-plugin/build.gradle +++ b/sizer-gradle-plugin/build.gradle @@ -71,7 +71,7 @@ gradlePlugin { id = 'com.grab.sizer' implementationClass = 'com.grab.plugin.sizer.AppSizerPlugin' displayName = 'App Sizer Plugin' - description = 'A tool designed to analyze the download size of Android applications' + description = project.description tags.set(['android', 'size', 'analysis', 'app-size']) } } From 9d12788a7dfa317afb11de74e4d24f3ce504b22e Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 03:49:15 +0800 Subject: [PATCH 05/10] Set project desc --- gradle/publishing.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index ff838e2..55a1839 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -68,7 +68,6 @@ afterEvaluate { publications { try { named("appSizerPluginPluginMarkerMaven") { publication -> - print("ssss") configurePom(publication) } } catch (UnknownDomainObjectException ignored) { From 4c6bfa4559805d4ff540a4a4b59bc75291513f30 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 03:53:17 +0800 Subject: [PATCH 06/10] Update sample --- sample/settings.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sample/settings.gradle b/sample/settings.gradle index a455e9f..b61ef14 100644 --- a/sample/settings.gradle +++ b/sample/settings.gradle @@ -1,4 +1,3 @@ - /* * MIT License * @@ -38,7 +37,7 @@ pluginManagement { includeBuild("../") { dependencySubstitution { - substitute module("com.grab.sizer:app-sizer-plugin") using project(":gradle-plugin") + substitute module("com.grab.sizer:app-sizer-plugin") using project(":sizer-gradle-plugin") } } From aebfb96c6f3dee10e6a32d9931afa1cfb499f6ee Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 04:45:50 +0800 Subject: [PATCH 07/10] Set project desc --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28e16ec..94904ec 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ buildscript { ``` In the app module 's `build.gradle` ```groovy -apply plugin: "com.grab.app-sizer" +plugins { + id "com.grab.sizer" +} // AppSizer configuration appSizer { From 5f9dfe88ff7f4c975d93009540b7859ab545cfa0 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 11:36:02 +0800 Subject: [PATCH 08/10] Update team information --- gradle/publishing.gradle | 46 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 55a1839..c4f4fc3 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -48,12 +48,54 @@ def configurePom = { MavenPublication publication -> } developers { developer { - id = 'grab' - name = 'Grab Engineers' + id = 'MinhNguyen-nvm' + name = "Minh Nguyen" email = 'van.minh@grab.com' organization = 'Grab' organizationUrl = 'https://github.com/grab' } + developer { + id = "arunkumar9t2" + name = "Arunkumar" + email = "hi@arunkumar.dev" + organization = 'Grab' + organizationUrl = 'https://github.com/grab' + } + developer { + id = "minkuan88" + name = "Min Kuan Lim" + email = "minkuan88@hotmail.com" + organization = 'Grab' + organizationUrl = 'https://github.com/grab' + } + developer { + id = "mohammadkahelghi-grabtaxi" + name = "Mohammad Khaleghi" + email = "mohammad.khaleghi@grabtaxi.com" + organization = 'Grab' + organizationUrl = 'https://github.com/grab' + } + developer { + id = "stevenchao-grabtaxi" + name = "Steven Chao" + email = "steven.chao@grabtaxi.com" + organization = 'Grab' + organizationUrl = 'https://github.com/grab' + } + developer { + id = "arnav-grabtaxi" + name = "Arnav Jain" + email = "arnav.jain@grabtaxi.com" + organization = 'Grab' + organizationUrl = 'https://github.com/grab' + } + developer { + id = "adarsh-grabtaxi" + name = "Adarsh Srivastava" + email = "adarsh.srivastava@grabtaxi.com" + organization = 'Grab' + organizationUrl = 'https://github.com/grab' + } } scm { connection = 'scm:git:git://github.com/grab/app-sizer.git' From 266e00273a497c32c2cee2eb4a00e74f7834bc12 Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 11:51:26 +0800 Subject: [PATCH 09/10] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94904ec..efa95eb 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ buildscript { In the app module 's `build.gradle` ```groovy plugins { - id "com.grab.sizer" + id "com.grab.sizer" version "" } // AppSizer configuration From 55f75fbc9e18df8752865820f0f1aef8d2b3ed3d Mon Sep 17 00:00:00 2001 From: arunkumar9t2 Date: Fri, 29 Nov 2024 12:02:04 +0800 Subject: [PATCH 10/10] Fix typo --- gradle/publishing.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index c4f4fc3..50df80d 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -43,7 +43,7 @@ def configurePom = { MavenPublication publication -> licenses { license { name = "The MIT License" - url = "hvttps://github.com/grab/App-Sizer/blob/master/LICENSE" + url = "https://github.com/grab/App-Sizer/blob/master/LICENSE" } } developers {