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 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/README.md b/README.md index 28e16ec..efa95eb 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" version "" +} // AppSizer configuration appSizer { diff --git a/app-sizer/build.gradle b/app-sizer/build.gradle index b2f26e3..b1312f3 100644 --- a/app-sizer/build.gradle +++ b/app-sizer/build.gradle @@ -26,8 +26,10 @@ */ plugins { - id 'com.grab.sizer.kotlin' + id 'com.grab.sizer.build.kotlin' + alias(libs.plugins.dokka.gradle.plugin) } +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/build/BuildPlugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt new file mode 100644 index 0000000..40e95cb --- /dev/null +++ b/build-logic/src/main/kotlin/com/grab/sizer/build/BuildPlugin.kt @@ -0,0 +1,38 @@ +/* + * 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.build + +import com.grab.sizer.gradle.ConfigurablePlugin + +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/build-logic/src/main/kotlin/com/grab/sizer/buildplugin/AppSizerConfigPlugin.kt b/build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt similarity index 57% rename from build-logic/src/main/kotlin/com/grab/sizer/buildplugin/AppSizerConfigPlugin.kt rename to build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt index 604d6cf..b22227d 100644 --- a/build-logic/src/main/kotlin/com/grab/sizer/buildplugin/AppSizerConfigPlugin.kt +++ b/build-logic/src/main/kotlin/com/grab/sizer/gradle/Plugin.kt @@ -25,31 +25,13 @@ * SOFTWARE */ -package com.grab.sizer.buildplugin +package com.grab.sizer.gradle -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" - } - - project.tasks.withType(JavaCompile::class.java).configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() - } - } -} \ No newline at end of file +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..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" @@ -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..50df80d 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -35,35 +35,11 @@ artifacts { archives sourcesJar } -afterEvaluate { - publishing { - publications { - // Gradle plugin marker if it exists - named("grazelPluginPluginMarkerMaven") { 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 - url = website + url = 'https://github.com/grab/app-sizer' licenses { license { name = "The MIT License" @@ -72,36 +48,96 @@ private void configurePom(MavenPublication publication) { } developers { developer { - id = "MinhNguyen-nvm" + id = 'MinhNguyen-nvm' name = "Minh Nguyen" - email = "minhnguyen.gtvt@gmail.com" + 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 = "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' + } + } +} + +afterEvaluate { + publishing { + publications { + try { + named("appSizerPluginPluginMarkerMaven") { publication -> + 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( - 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 } -} \ No newline at end of file +} 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") } } 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..9e0d094 --- /dev/null +++ b/sizer-gradle-plugin/build.gradle @@ -0,0 +1,82 @@ +/* + * 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.build.kotlin" + alias(libs.plugins.kotlin.dsl) + alias(libs.plugins.gradle.plugin.publish) + id "maven-publish" +} +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 +} + +pluginBundle { + mavenCoordinates { + groupId = project.group + artifactId = project.name + } +} +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 = project.description + 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/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/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