Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreipol/dreimultiplatform
https://github.com/dreipol/dreimultiplatform
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dreipol/dreimultiplatform
- Owner: dreipol
- License: mit
- Created: 2020-07-29T12:20:25.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-04-11T06:38:13.000Z (7 months ago)
- Last Synced: 2024-04-11T07:48:01.042Z (7 months ago)
- Language: Kotlin
- Size: 272 KB
- Stars: 10
- Watchers: 7
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dreimultiplatform
Shared Repository for [KMM](https://kotlinlang.org/lp/mobile/) projects# use it in your KMM Project
* In your `build.gradle` add maven central
```groovy
allprojects {
repositories {
mavenCentral()
...
}
}
```
* In your `shared/build.gradle` add the dependency
```groovy
dependencies {
implementation "ch.dreipol:dreimultiplatform:"
}
```
* Sync your gradle project and you should be able to import packages from dreimultiplatform
* Enjoy# Local Development inside KMM Project
* Clone repo into `/SOME-DIR/dreimultiplatform` (outside of your KMM repository)
* In `local.properties` add:
```groovy
dreimultiplatform.dir=/SOME-DIR/dreimultiplatform
```
* In your `settings.gradle` dynamically include the project if the setting exists
```groovy
Properties properties = new Properties()
File localProperties = new File(rootProject.projectDir.absolutePath + '/local.properties')
if (localProperties.exists()) {
properties.load(localProperties.newDataInputStream())
def dreimultiplatformDir = properties.getProperty('dreimultiplatform.dir')
if (dreimultiplatformDir != null) {
include ':dreimultiplatform'
project(':dreimultiplatform').projectDir = new File(dreimultiplatformDir)
}
}
```
* In your `build.gradle` add repository url for mavenCentral
```groovy
mavenCentral()
```
* In your `shared/build.gradle` add the dependency if the local property is set otherwise fetch from JitPack
```groovy
dependencies {Properties properties = new Properties()
File localProperties = new File(rootProject.projectDir.absolutePath + '/local.properties')
String dreimultiplatformDir = null
if (localProperties.exists()) {
properties.load(localProperties.newDataInputStream())
dreimultiplatformDir = properties.getProperty('dreimultiplatform.dir')
}
if (dreimultiplatformDir != null) {
implementation project (":dreimultiplatform")
} else {
// if the dreimultiplatform local directory is not set we will fetch from bintray
implementation "ch.dreipol:dreimultiplatform:"
}
}
```
* Sync your gradle project and you should be able to import packages from dreimultiplatform
* Enjoy