{"id":19729491,"url":"https://github.com/bb4/bb4-gradle","last_synced_at":"2026-06-16T07:31:29.352Z","repository":{"id":71445991,"uuid":"330185511","full_name":"bb4/bb4-gradle","owner":"bb4","description":"Shared build logic for bb4 projects","archived":false,"fork":false,"pushed_at":"2026-03-28T13:11:38.000Z","size":242,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T16:28:44.910Z","etag":null,"topics":["build","deploy","publish","scala"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bb4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-16T14:51:12.000Z","updated_at":"2026-03-28T13:11:41.000Z","dependencies_parsed_at":"2023-03-25T14:34:27.408Z","dependency_job_id":null,"html_url":"https://github.com/bb4/bb4-gradle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bb4/bb4-gradle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bb4%2Fbb4-gradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bb4%2Fbb4-gradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bb4%2Fbb4-gradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bb4%2Fbb4-gradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bb4","download_url":"https://codeload.github.com/bb4/bb4-gradle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bb4%2Fbb4-gradle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34394384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","deploy","publish","scala"],"created_at":"2024-11-12T00:12:37.732Z","updated_at":"2026-06-16T07:31:29.347Z","avatar_url":"https://github.com/bb4.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bb4-gradle\n\nPublished **Gradle convention plugins** for Barry’s bb4 Scala/Java projects. This repo replaces the old model (JAR of `apply from` Groovy scripts) with standard **`plugins { id(\"…\") }`** IDs.\n\n## Requirements\n\n| Item | Version |\n|------|---------|\n| Gradle (wrapper) | **8.14.x** (see `gradle/wrapper/gradle-wrapper.properties`) |\n| Java toolchain | **21** (enforced by `com.barrybecker4.bb4.base`) |\n| Scala (default in plugins) | **3.8.2** (override via `bb4 { scalaVersion.set(\"…\") }` if needed) |\n\n## Published plugins\n\n| Plugin ID | Purpose |\n|-----------|---------|\n| `com.barrybecker4.bb4.base` | Java 21 toolchain, shared repositories, resolution defaults, Central Portal credential property placeholders |\n| `com.barrybecker4.bb4.scala-library` | `java-library` + Scala, bb4 source layouts, test deps (JUnit 5, ScalaTest), jar/manifest conventions |\n| `com.barrybecker4.bb4.publish` | `maven-publish` + signing, Maven Central / Central Portal, sources/javadoc/scaladoc jars; optional `jarMap` multi-artifact mode |\n| `com.barrybecker4.bb4.application` | `application` plugin, `run` stdin, website deploy tasks, distribution tweaks |\n\nPlugin implementations live under `src/main/groovy/`.\n\n**Dependency versions** (Scala, ScalaTest, JUnit, etc. applied to your projects by these plugins) are maintained in one place: [`Bb4DependencyVersions.groovy`](src/main/groovy/com/barrybecker4/gradle/plugins/Bb4DependencyVersions.groovy).\n\n## Consume in another project\n\nUse the **Gradle Plugin Portal** and/or your Maven repo where you publish `bb4-gradle`, plus matching **plugin marker** artifacts (`*.gradle.plugin`).\n\n**settings.gradle** (or `.kts`):\n\n```groovy\npluginManagement {\n    repositories {\n        gradlePluginPortal()\n        mavenCentral()\n        // Required while using 2.0-SNAPSHOT from Central snapshot repo (until a 2.0.x release is on Central):\n        maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }\n    }\n}\n```\n\n**build.gradle** (Groovy example):\n\n```groovy\nplugins {\n    id 'com.barrybecker4.bb4.scala-library' version '2.0-SNAPSHOT' // or '2.0.0' when released\n    id 'com.barrybecker4.bb4.publish' version '2.0-SNAPSHOT'   // if this module publishes\n    id 'com.barrybecker4.bb4.application' version '2.0-SNAPSHOT' // optional, for apps\n}\n\ngroup = 'com.barrybecker4'\nversion = '1.0-SNAPSHOT'\n\nbb4 {\n    archivesBaseName.set('my-artifact')  // optional; defaults to project.name\n    mainClass.set('com.example.Main')    // optional jar manifest / application main\n    // scalaVersion.set('3.8.2')        // optional override\n}\n```\n\nApply only what you need:\n\n- **Library** → `com.barrybecker4.bb4.scala-library` (applies **base** conventions internally: Java 21 toolchain, repos, resolution). Use **`com.barrybecker4.bb4.base` alone** only if you want toolchain/repos without applying Scala.\n- **Publish to Sonatype** → add `com.barrybecker4.bb4.publish`.\n- **CLI / dist / deploy** → add `com.barrybecker4.bb4.application`.\n\nSource layout expected by `scala-library`:\n\n- Java: `source/`, tests: `test/`\n- Scala: `scala-source/`, tests: `scala-test/`\n\n## Publish this project (`bb4-gradle`)\n\n1. Set version in `build.gradle.kts` (release = no `-SNAPSHOT`).\n2. Configure credentials in `~/.gradle/gradle.properties` (or env vars): `ossrhToken`, `ossrhTokenPassword` (or `OSSRH_USERNAME` / `OSSRH_PASSWORD`).\n3. Run:\n\n```bash\n./gradlew publishArtifacts\n```\n\nSnapshots use the **Central** snapshot repository; releases use the **OSSRH Staging API** deploy URL (signing required for non-SNAPSHOT). **OSSRH is EOL** — use a **Central Portal user token**, not legacy OSSRH credentials.\n\nDetails: [docs/publishing-sonatype.md](docs/publishing-sonatype.md).\n\n## Migration from script JAR (1.x)\n\nLegacy `buildscript { classpath 'com.barrybecker4:bb4-gradle:…' }` + `apply from: …getResource('bb4.gradle')` is **removed** in 2.x. See [docs/migration-from-scripts.md](docs/migration-from-scripts.md).\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbb4%2Fbb4-gradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbb4%2Fbb4-gradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbb4%2Fbb4-gradle/lists"}