Skip to content

Commit 8cba4a5

Browse files
committed
add flavors
1 parent b781c5c commit 8cba4a5

3 files changed

Lines changed: 35 additions & 4 deletions

File tree

0 Bytes
Binary file not shown.

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,17 @@ dependencies {
88
exclude group: 'com.android.support'
99
}
1010
}
11-
```
11+
```
12+
13+
# Helpful docs
14+
## Library design
15+
- [How to improve your Android Library – Maxi Rosson – Medium](https://medium.com/@maxirosson/how-to-improve-your-android-library-2e8b9fd6c090)
16+
17+
## Setting up
18+
### JitPack.io
19+
- [Publishing Java / android / kotlin libraries on Jitpack](https://medium.com/@erluxman/publishing-java-android-kotlin-libraries-on-jitpack-b33d0d26dc8a)
20+
- [Publish an Android Library by JitPack](https://medium.com/@ome450901/publish-an-android-library-by-jitpack-a0342684cbd0)
21+
- [android\-jitpack\-library\-example/build\.gradle at master · jitpack\-io/android\-jitpack\-library\-example](https://github.com/jitpack-io/android-jitpack-library-example/blob/master/app/build.gradle)
22+
23+
### Local testing
24+
- [How to link an Android app to a local library project](https://gist.github.com/nolanlawson/fe5bfab1867d71000c81)

utils/build.gradle

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ group='com.github.Chronstruct'
77

88

99
android {
10-
publishNonDefault true
11-
1210
compileSdkVersion 27
1311

1412
defaultConfig {
@@ -18,16 +16,36 @@ android {
1816
versionName "1.0"
1917

2018
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
21-
2219
}
2320

21+
resourcePrefix 'CHRONSTRUCT_UTILS'
22+
2423
buildTypes {
2524
release {
2625
minifyEnabled false
2726
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2827
}
28+
debug {
29+
debuggable true
30+
}
2931
}
3032

33+
flavorDimensions "mode"
34+
// configure different classes and resources for different app versions
35+
// usually dev, staging, prod, and api-variants
36+
productFlavors {
37+
dev {
38+
dimension "mode"
39+
}
40+
prod {
41+
dimension "mode"
42+
}
43+
}
44+
45+
// default build flavour
46+
defaultPublishConfig "prodRelease"
47+
// true to publish all flavour artifacts
48+
publishNonDefault true
3149
}
3250

3351
def support_version = "27.0.2"

0 commit comments

Comments
 (0)