A simple
OKHttpclient 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-pluginA couple Gradle plugins to make Android modules to work with JaCoCo Report Aggregation Plugin and Test Report Aggregation Plugin
A Gradle plugin that sets an overall run timeout for the build.
plugins { id("io.github.gmazzo.build.timeout") version "<latest>" }./gradlew build -PbuildTimeout=10m
A Gradle plugin that enables JaCoCo coverage collection for Gradle TestKit's GradleRunner tests.
plugins { `java-gradle-plugin` id("io.github.gmazzo.gradle.testkit.jacoco") version "<latest>" }A Gradle plugin allows targeting multiple
gradleApi()s versions.plugins { `java-gradle-plugin` id("io.github.gmazzo.gradle.multiapi") version "<latest>" } gradlePlugin { apiTargets("7.0", "8.1", "8.13") }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-pluginA 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.demominSDK: 24targetSDK: 34permissions: - 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}") privatelateinitvar appEndpoint:String
gradle-embedded-dependencies-pluginA Gradle plugin to embed dependencies (A.K.A.
fatoruberjar) in the producedjar.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
Proguardtool.// build.gradle.kts importClasses { repackageTo ="org.test.imported" keep("org.apache.commons.lang3.StringUtils") } dependencies { importClasses("org.apache.commons:commons-lang3:3.14.0") }
// Foo.javapackageorg.test; importorg.test.imported.StringUtils; publicclassFoo { publicStringswapCase(Stringstring) { returnStringUtils.swapCase(string); } }
A Gradle plugin to constrain a multi-module build dependency graph.
moduleKindConstraints { "implementation" compatibleWith "api""monolith" compatibleWith "implementation""monolith" compatibleWith "api"// redundant, since compatibilities are transitive }moduleKindapi implementation monolith api ❌ ❌ ❌ implementation ✅ ❌ ❌ monolith ✅ ✅ ✅ An opinionated Gradle plugin to provide a project version using Git tags.
plugins { id("io.github.gmazzo.gitversion") version "<latest>" gitVersion { tagPrefix ="v"// Optional, default is "v" initialVersion ="0.1.0-SNAPSHOT"// Optional, default is "0.1.0-SNAPSHOT" } }gradle-report-publications-pluginA Gradle plugin that decorates the build logs with maven coordinates of artifacts published with
publishorpublishToMavenLocal
A Swift compiler plugin to add CodeOwners attribution to Swift types
structMyType{func printOwner(){print("This type is owned by \(codeOwnersOf(self))") // or print("This type is owned by \(codeOwnersOf(MyType.self))") // or print("This type is owned by \(codeOwnersOf(MyType()))") // or }}
android-weather-tree-live-wallpaperA live wallpaper with trees in background landscape, with scenes for local weather
An unofficial Docker image for running Kotlin scripts.
docker run -v ./scripts:/scripts gmazzo/kotlin /scripts/hello.kts
Reports
JUnit,Android Lint, Xcode'sXCResults,Detektand any otherCheckStylecompatibleXMLreports as GitHub Actions annotations. Mostly targetingGradlebuildssteps: - name: Run Gradle buildrun: ./gradlew build # this is an example - name: Report build resultsuses: gmazzo/publish-report-annotations@v1 # target latest majorif: ${{ !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












