-
A simple
OKHttp
client mock, using a programmable request interceptorval interceptor = MockInterceptor() interceptor.rule(url eq "https://testserver/api/json") { respond("{succeed:true}", MEDIATYPE_JSON) }
-
A plugin for generating BuildConstants for any kind of Gradle projects: Java, Kotlin, Groovy, etc. Designed for KTS scripts.
buildConfig { buildConfigField("APP_NAME", project.name) buildConfigField("APP_VERSION", provider { "${project.version}" })
-
gradle-android-test-aggregation-plugin
A couple Gradle plugins to make Android modules to work with JaCoCo Report Aggregation Plugin and Test Report Aggregation Plugin
-
A Gradle plugin to allow consuming Android's AAR dependencies as JAR dependencies for JVM projects.
plugins { java id("io.github.gmazzo.aar2jar") version "<latest>" } dependencies { implementation("androidx.fragment:fragment:1.8.5") }
-
A set of Gradle plugins to propagate CODEOWNERS of classes to runtime for JVM and Kotlin Multiplatform.
val ownersOfFoo = codeOwnersOf<Foo>()
-
gradle-android-manifest-lock-plugin
A Gradle plugin for providing .lock file support for AndroidManifest. Useful to control what's introduced by 3rd party dependencies into your Manifest.
main: namespace: io.github.gmazzo.android.manifest.lock.demo minSDK: 24 targetSDK: 34 permissions: - android.permission.ACCESS_NETWORK_STATE - android.permission.FOREGROUND_SERVICE
-
Spawns Docker Compose environments for Test tasks as a Gradle's
Shared Build Service
.@Value("\${container.main-app.host}:\${container.main-app.tcp80}") private lateinit var appEndpoint: String
-
gradle-embedded-dependencies-plugin
A Gradle plugin to embed dependencies (A.K.A.
fat
oruber
jar) in the resultingjar
outcome.plugins { java id("io.github.gmazzo.dependencies.embedded") version "<latest>" } dependencies { embedded("org.apache.commons:commons-lang3:3.14.0") }
-
A Gradle plugin to import and repackage dependencies
Proguard
tool.// build.gradle.kts sourceSets.main { importClasses("org.apache.commons:commons-lang3:3.14.0") { repackageTo = "org.test.imported" keep("org.apache.commons.lang3.StringUtils") } }
// Foo.java package org.test; import org.test.imported.StringUtils; public class Foo { public String swapCase(String string) { return StringUtils.swapCase(string); } }
-
gradle-report-publications-plugin
A Gradle plugin that decorates the build logs with maven coordinates of artifacts published with
publish
orpublishToMavenLocal
-
An unofficial Docker image for running Kotlin scripts.
docker run -v ./scripts:/scripts gmazzo/kotlin /scripts/hello.kts
-
Reports
JUnit
,Android Lint
,Detekt
and any otherCheckStyle
compatibleXML
reports as GitHub Actions annotations. Mostly targetingGradle
buildssteps: - name: Run Gradle build run: ./gradlew build # this is an example - name: Report build results uses: gmazzo/publish-report-annotations@v1 # target latest major if: ${{ !cancelled() }}
Test Suites β 93 passed π‘ 1 skipped β 4 failed β took β org.test.sample.AnotherTestSuite
- β aTest[maxDuration=100] (β 0.054)
- β aTest[maxDuration=200] (β 0.107)
- β aTest[maxDuration=300] (β 0.238)
- β aTest[maxDuration=400] (β 0.103)
4 0 0 0.506 β org.test.sample.FlakyFailingTestSuite
- β failingTest() (β 0.011)
0 0 1 2.07 1 0 0 1.295 β org.test.sample.SampleTestSuite
- π‘ a test skipped() (β 0)
- β a test that fails() (β 0.002)
- β a test that passes() (β 0.001)
- β a test that throws an exception() (β 0.001)
1 1 2 0.004