https://github.com/chrynan/platform
Simple Kotlin Multiplatform Library to Access the Platform Type in a Common Module
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.8%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Simple Kotlin Multiplatform Library to Access the Platform Type in a Common Module
Basic Info
Statistics
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
kotlin-platform
Simple Kotlin Multi-platform Library to Access the Platform Type in a Common Module.
Library
The platform global property can be accessed to retrieve the current Platform type at runtime:
kotlin
fun performPlatformDependentAction() =
when (platform) {
is Platform.Jvm -> jvmAction()
is Platform.Android -> androidAction()
is Platform.Ios -> iosAction()
is Platform.Js -> nodeJsAction()
}
Each Platform instance provides platform specific properties:
kotlin
androidPlatform.sdkInt
andoridPlatform.versionName
Building
The library is provided through Repsy.io. Checkout
the releases page to get the latest version.
Repository
repositories {
maven { url = "https://repo.repsy.io/mvn/chrynan/public" }
}
Dependencies
implementation "com.chrynan.platform:platform-core:VERSION"
Documentation
More detailed documentation is available in the docs folder. The entry point to the documentation can be found here.
License
``` Copyright 2021 chRyNaN
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```
Owner
- Name: Christopher
- Login: chRyNaN
- Kind: user
- Location: Austin, TX
- Company: Starry
- Website: https://chrynan.codes
- Repositories: 15
- Profile: https://github.com/chRyNaN
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Chris | c****n@s****m | 23 |
| Christopher | b****p@g****m | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
Dependencies
- actions/first-interaction v1 composite
- org.jetbrains.kotlin:kotlin-stdlib-common * implementation
- org.jetbrains.kotlinx:kotlinx-serialization-json 1.3.3 implementation