{"id":15294676,"url":"https://github.com/05nelsonm/component-build-configuration","last_synced_at":"2025-09-10T21:33:22.472Z","repository":{"id":40398519,"uuid":"423201494","full_name":"05nelsonm/component-build-configuration","owner":"05nelsonm","description":"BuildConfiguration information for use in multi-module, or Kotlin Multiplatform common code","archived":false,"fork":false,"pushed_at":"2023-01-17T11:08:39.000Z","size":166,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-24T16:25:38.725Z","etag":null,"topics":["android","android-lib","android-libraries","android-library","android-libs","kotlin","kotlin-android","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-multiplatform-mobile"],"latest_commit_sha":null,"homepage":"https://kotlin-components.matthewnelson.io","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/05nelsonm.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}},"created_at":"2021-10-31T16:31:55.000Z","updated_at":"2023-01-11T08:37:00.000Z","dependencies_parsed_at":"2023-02-10T09:16:00.893Z","dependency_job_id":null,"html_url":"https://github.com/05nelsonm/component-build-configuration","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/05nelsonm%2Fcomponent-build-configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/05nelsonm%2Fcomponent-build-configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/05nelsonm%2Fcomponent-build-configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/05nelsonm%2Fcomponent-build-configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/05nelsonm","download_url":"https://codeload.github.com/05nelsonm/component-build-configuration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227687284,"owners_count":17804367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android","android-lib","android-libraries","android-library","android-libs","kotlin","kotlin-android","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-multiplatform-mobile"],"created_at":"2024-09-30T17:05:51.442Z","updated_at":"2024-12-02T07:24:51.170Z","avatar_url":"https://github.com/05nelsonm.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# component-build-configuration\n[![badge-license]][url-license]\n[![badge-latest-release]][url-latest-release]\n\n[![badge-kotlin]][url-kotlin]\n\n![badge-platform-android]\n![badge-platform-jvm]\n![badge-platform-js]\n![badge-platform-js-node]\n![badge-platform-linux]\n![badge-platform-macos]\n![badge-platform-ios]\n![badge-platform-tvos]\n![badge-platform-watchos]\n![badge-platform-wasm]\n![badge-platform-windows]\n![badge-support-android-native]\n![badge-support-apple-silicon]\n![badge-support-js-ir]\n![badge-support-linux-arm]\n![badge-support-linux-mips]\n\nA Kotlin Multiplatform library for utilizing `BuildConfiguration` details from common code.\n\n### Get Started\n\n\u003c!-- TAG_VERSION --\u003e\n\n```kotlin\n// build.gradle.kts\ndependencies {\n    implementation(\"io.matthewnelson.kotlin-components:build-configuration:3.0.5\")\n}\n```\n\n\u003c!-- TAG_VERSION --\u003e\n\n```groovy\n// build.gradle\ndependencies {\n    implementation \"io.matthewnelson.kotlin-components:build-configuration:3.0.5\"\n}\n```\n\n### Kotlin Version Compatibility\n\n**Note:** as of `2.0.0`, the experimental memory model for KotlinNative is enabled.\n\n\u003c!-- TAG_VERSION --\u003e\n\n| build-configuration | kotlin |\n|:-------------------:|:------:|\n|        3.0.5        | 1.8.0  |\n|        3.0.4        | 1.7.20 |\n|        3.0.3        | 1.6.21 |\n|        3.0.2        | 1.6.21 |\n|        3.0.1        | 1.6.21 |\n|        3.0.0        | 1.6.10 |\n|        2.0.0        | 1.6.10 |\n|          1          | 1.5.31 |\n\n### Usage (Android example using Hilt dependency injection)\n\n```kotlin\n// module :app\n\nimport io.matthewnelson.component.build.configuration.BuildConfiguration\n\n@Module\n@InstallIn(SingletonComponent::class)\nobject AppModule {\n    \n    @Provides\n    @Singleton\n    fun provideBuildConfig(): BuildConfiguration =\n        BuildConfiguration(\n            applicationId = BuildConfig.APPLICATION_ID,\n            versionName = BuildConfig.VERSION_NAME,\n            versionCode = BuildConfig.VERSION_CODE,\n            isDebug = BuildConfig.DEBUG,\n            variant = BuildConfig.BUILD_TYPE,\n            flavor = BuildConfig.FLAVOR,\n        )\n    \n    @Provides\n    fun provideMyMultiPlatformClass(\n        buildConfiguration: BuildConfiguration\n    ): MyMultiPlatformClass =\n        MyMultiPlatformClass(buildConfiguration)\n}\n\n// module :core (kotlin multiplatform project where class is in commonMain)\nclass MyMultiPlatformClass(private val config: BuildConfiguration) {\n    \n    fun doSomethingWithString(string: String): String {\n        if (config.isDebug) {\n            // do this\n        } else {\n            // do that\n        }\n    }\n}\n```\n\n### Git\n\nThis project utilizes git submodules. You will need to initialize them when\ncloning the repository via:\n\n```bash\n$ git clone --recursive https://github.com/05nelsonm/component-build-configuration.git\n```\n\nIf you've already cloned the repository, run:\n```bash\n$ git checkout master\n$ git pull\n$ git submodule update --init\n```\n\nIn order to keep submodules updated when pulling the latest code, run:\n```bash\n$ git pull --recurse-submodules\n```\n\n\u003c!-- TAG_VERSION --\u003e\n[badge-latest-release]: https://img.shields.io/badge/latest--release-3.0.5-blue.svg?style=flat\n[badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat\n\n\u003c!-- TAG_DEPENDENCIES --\u003e\n[badge-kotlin]: https://img.shields.io/badge/kotlin-1.8.0-blue.svg?logo=kotlin\n\n\u003c!-- TAG_PLATFORMS --\u003e\n[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat\n[badge-platform-jvm]: http://img.shields.io/badge/-jvm-DB413D.svg?style=flat\n[badge-platform-js]: http://img.shields.io/badge/-js-F8DB5D.svg?style=flat\n[badge-platform-js-node]: https://img.shields.io/badge/-nodejs-68a063.svg?style=flat\n[badge-platform-linux]: http://img.shields.io/badge/-linux-2D3F6C.svg?style=flat\n[badge-platform-macos]: http://img.shields.io/badge/-macos-111111.svg?style=flat\n[badge-platform-ios]: http://img.shields.io/badge/-ios-CDCDCD.svg?style=flat\n[badge-platform-tvos]: http://img.shields.io/badge/-tvos-808080.svg?style=flat\n[badge-platform-watchos]: http://img.shields.io/badge/-watchos-C0C0C0.svg?style=flat\n[badge-platform-wasm]: https://img.shields.io/badge/-wasm-624FE8.svg?style=flat\n[badge-platform-windows]: http://img.shields.io/badge/-windows-4D76CD.svg?style=flat\n[badge-support-android-native]: http://img.shields.io/badge/support-[AndroidNative]-6EDB8D.svg?style=flat\n[badge-support-apple-silicon]: http://img.shields.io/badge/support-[AppleSilicon]-43BBFF.svg?style=flat\n[badge-support-js-ir]: https://img.shields.io/badge/support-[js--IR]-AAC4E0.svg?style=flat\n[badge-support-linux-arm]: http://img.shields.io/badge/support-[LinuxArm]-2D3F6C.svg?style=flat\n[badge-support-linux-mips]: http://img.shields.io/badge/support-[LinuxMIPS]-2D3F6C.svg?style=flat\n\n[url-latest-release]: https://github.com/05nelsonm/component-build-configuration/releases/latest\n[url-license]: https://www.apache.org/licenses/LICENSE-2.0.txt\n[url-kotlin]: https://kotlinlang.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F05nelsonm%2Fcomponent-build-configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F05nelsonm%2Fcomponent-build-configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F05nelsonm%2Fcomponent-build-configuration/lists"}