Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreipol/dreidroid
Shared Repository for Android projects
https://github.com/dreipol/dreidroid
Last synced: 7 days ago
JSON representation
Shared Repository for Android projects
- Host: GitHub
- URL: https://github.com/dreipol/dreidroid
- Owner: dreipol
- License: mit
- Created: 2020-01-29T13:45:40.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2022-07-28T07:00:05.000Z (over 2 years ago)
- Last Synced: 2023-07-28T00:14:54.589Z (over 1 year ago)
- Language: Kotlin
- Homepage: https://www.dreipol.dev/dreidroid/
- Size: 1.26 MB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dreidroid
Shared Repository for Android projectsDocumentation is available [here](https://www.dreipol.dev/dreidroid/).
# use it in your Android Project
* In your `build.gradle` add repository url for MavenCentral
```groovy
repositories {
mavenCentral()
...
}
```
* In your `app/build.gradle` add the dependency
```groovy
dependencies {
implementation "ch.dreipol:dreidroid:"
}
```
* Sync your gradle project and you should be able to import packages from dreidroid
* Enjoy# Local Development inside Android Project
* Clone repo into `/SOME-DIR/dreidroid` (outside of your app repository)
* In `local.properties` add:
```groovy
dreidroid.dir=/SOME-DIR/dreidroid
```
* 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 dreidroidDir = properties.getProperty('dreidroid.dir')
if (dreidroidDir != null) {
include ':dreidroid'
project(':dreidroid').projectDir = new File(dreidroidDir)
}
}
```
* In your `build.gradle` add repository url for JitPack
```groovy
maven {
url 'https://jitpack.io'
}
```
* In your `app/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 dreidroidDir = null
if (localProperties.exists()) {
properties.load(localProperties.newDataInputStream())
dreidroidDir = properties.getProperty('dreidroid.dir')
}
if (dreidroidDir != null) {
implementation project (":dreidroid")
} else {
// if the dreidroid local directory is not set we will fetch from maven central
implementation "ch.dreipol:dreidroid:"
}
}
```
* Sync your gradle project and you should be able to import packages from dreidroid
* Enjoy