Skip to content

Commit 9f78b1e

Browse files
feat: [CS-37836] includeMetadata, Azure-EU and General Fixes
1 parent 618c0ae commit 9f78b1e

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

contentstack/build.gradle

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'jacoco'
33

4-
54
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
65

76
android {
8-
//namespace 'com.contentstack.sdk'
97
compileSdk 33
10-
118
defaultConfig {
129
minSdk 19
1310
targetSdk 33
@@ -17,7 +14,33 @@ android {
1714
vectorDrawables.useSupportLibrary = true
1815
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1916
}
20-
17+
buildTypes {
18+
def localProperties = new Properties()
19+
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
20+
debug {
21+
debuggable true
22+
testCoverageEnabled true
23+
buildConfigField "String", "host", localProperties['host']
24+
buildConfigField "String", "APIKey", localProperties['APIKey']
25+
buildConfigField "String", "deliveryToken", localProperties['deliveryToken']
26+
buildConfigField "String", "environment", localProperties['env']
27+
buildConfigField "String", "contentTypeUID", localProperties['contentType']
28+
buildConfigField "String", "assetUID", localProperties['assetUid']
29+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
30+
}
31+
release {
32+
debuggable false
33+
minifyEnabled false
34+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
35+
buildConfigField "String", "host", localProperties['host']
36+
buildConfigField "String", "APIKey", localProperties['APIKey']
37+
buildConfigField "String", "deliveryToken", localProperties['deliveryToken']
38+
buildConfigField "String", "environment", localProperties['env']
39+
buildConfigField "String", "contentTypeUID", localProperties['contentType']
40+
buildConfigField "String", "assetUID", localProperties['assetUid']
41+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
42+
}
43+
}
2144
compileOptions {
2245
sourceCompatibility JavaVersion.VERSION_1_8
2346
targetCompatibility JavaVersion.VERSION_1_8
@@ -41,13 +64,6 @@ dependencies {
4164
testImplementation 'junit:junit:4.13.2'
4265
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
4366
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
44-
// testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
45-
// implementation 'androidx.appcompat:appcompat:1.6.1'
46-
// implementation 'com.android.volley:volley:1.2.1'
47-
// androidTestImplementation 'androidx.test:core:1.5.0'
48-
// androidTestImplementation "androidx.test:runner:1.5.2"
49-
// androidTestImplementation "androidx.test:rules:1.5.0"
50-
5167
}
5268
java {
5369
sourceCompatibility = JavaVersion.VERSION_1_8

scripts/publish-root.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ nexusPublishing {
2121
password = ossrhPassword
2222
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
2323
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/"))
24-
// if (project.version.endsWith('-SNAPSHOT')) {
25-
// snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots"))
26-
// } else {
27-
// nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
28-
// }
24+
if (project.version.endsWith('-SNAPSHOT')) {
25+
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots"))
26+
} else {
27+
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
28+
}
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)