-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from contentstack/CS-41546/Issue_in_context
Null issue fixed and removed secret credentials
- Loading branch information
Showing
11 changed files
with
241 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,200 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'jacoco' | ||
plugins { | ||
id 'signing' | ||
id 'maven-publish' | ||
id 'com.android.library' | ||
id 'jacoco' | ||
} | ||
|
||
def localProperties = new Properties() | ||
localProperties.load(new FileInputStream(rootProject.file("local.properties"))) | ||
|
||
group = 'com.contentstack.sdk' | ||
version = '3.12.4-SNAPSHOT' | ||
|
||
|
||
//publishing { | ||
// publications { | ||
// mavenJava(MavenPublication) { | ||
// artifactId = 'android' | ||
// versionMapping { | ||
// usage('java-api') { | ||
// fromResolutionOf('runtimeClasspath') | ||
// } | ||
// usage('java-runtime') { | ||
// fromResolutionResult() | ||
// } | ||
// } | ||
// pom { | ||
// | ||
// name = 'contentstack-android' | ||
// packaging 'aar' | ||
// artifactId "android" | ||
// description = 'Android SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first approach' | ||
// url = 'https://github.com/contentstack/contentstack-android' | ||
// | ||
// scm { | ||
// url 'https://github.com/contentstack/contentstack-android/' | ||
// connection 'scm:[email protected]:contentstack/contentstack-android' | ||
// developerConnection 'scm:[email protected]:contentstack/contentstack-android.git' | ||
// } | ||
// | ||
// licenses { | ||
// license { | ||
// name 'The MIT License' | ||
// url 'http://www.opensource.org/licenses/mit-license.php' | ||
// distribution 'repo' | ||
// } | ||
// } | ||
// developers { | ||
// developer { | ||
// id 'ishaileshmishra' | ||
// name 'Shailesh Mishra' | ||
// email '[email protected]' | ||
// } | ||
// } | ||
// } | ||
// } | ||
// } | ||
// repositories { | ||
// maven { | ||
// def releasesRepoUrl = layout.buildDirectory.dir('repos/releases') | ||
// def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots') | ||
// url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
// } | ||
// } | ||
//} | ||
|
||
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" | ||
//signing { | ||
// sign publishing.publications.mavenJava | ||
//} | ||
|
||
|
||
//javadoc { | ||
// if (JavaVersion.current().isJava9Compatible()) { | ||
// options.addBooleanOption('html5', true) | ||
// } | ||
//} | ||
|
||
|
||
tasks.register('jacocoTestReport', JacocoReport) { | ||
// dependsOn['testDebugUnitTest', 'createDebugCoverageReport'] | ||
reports { | ||
html.enabled = true | ||
} | ||
|
||
// afterEvaluate { | ||
// classDirectories.setFrom(files(classDirectories.files.collect { | ||
// fileTree(dir: it, exclude: '**com/contentstack/okhttp**') | ||
// fileTree(dir: it, exclude: '**com/contentstack/okio**') | ||
// fileTree(dir: it, exclude: '**com/contentstack/txtmark**') | ||
// })) | ||
// } | ||
} | ||
android { | ||
compileSdk 33 | ||
packagingOptions { | ||
exclude 'META-INF/DEPENDENCIES' | ||
exclude 'META-INF/LICENSE.md' | ||
exclude 'META-INF/LICENSE-notice.md' | ||
exclude 'META-INF/license.txt' | ||
exclude 'META-INF/NOTICE' | ||
exclude 'META-INF/NOTICE.txt' | ||
exclude 'META-INF/notice.txt' | ||
exclude 'META-INF/ASL2.0' | ||
exclude("META-INF/*.kotlin_module") | ||
} | ||
testOptions { | ||
unitTests.all { | ||
jacoco { | ||
includeNoLocationClasses = true | ||
} | ||
} | ||
} | ||
signingConfigs { | ||
debug { | ||
storeFile file("/Users/shaileshmishra/keystore/release.keystore") | ||
storePassword 'android' | ||
keyAlias 'androiddebugkey' | ||
keyPassword 'android' | ||
} | ||
release { | ||
storeFile file("/Users/shaileshmishra/keystore/release.keystore") | ||
storePassword 'android' | ||
keyAlias 'androiddebugkey' | ||
keyPassword 'android' | ||
} | ||
} | ||
compileSdk 26 | ||
defaultConfig { | ||
minSdk 19 | ||
targetSdk 33 | ||
minSdkVersion 19 | ||
versionCode 1 | ||
versionName "1.0" | ||
multiDexEnabled true | ||
vectorDrawables.useSupportLibrary = true | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
signingConfig signingConfigs.debug | ||
useLibrary 'org.apache.http.legacy' | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
signingConfig signingConfigs.release | ||
} | ||
|
||
buildTypes { | ||
def localProperties = new Properties() | ||
localProperties.load(new FileInputStream(rootProject.file("local.properties"))) | ||
debug { | ||
debuggable true | ||
testCoverageEnabled true | ||
buildConfigField "String", "host", localProperties['host'] | ||
buildConfigField "String", "APIKey", localProperties['APIKey'] | ||
buildConfigField "String", "deliveryToken", localProperties['deliveryToken'] | ||
buildConfigField "String", "environment", localProperties['env'] | ||
buildConfigField "String", "contentTypeUID", localProperties['contentType'] | ||
buildConfigField "String", "assetUID", localProperties['assetUid'] | ||
} | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
flavorDimensions "default" | ||
lintOptions { abortOnError false } | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
testOptions { | ||
unitTests.all { | ||
jacoco { | ||
includeNoLocationClasses = true | ||
} | ||
} | ||
unitTests.returnDefaultValues = true | ||
} | ||
} | ||
repositories { | ||
// flatDir { dirs 'libs' } | ||
// mavenCentral() | ||
// mavenLocal() | ||
} | ||
|
||
configurations { archives } | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.appcompat:appcompat:1.6.1' | ||
configurations.configureEach { resolutionStrategy.force 'com.android.support:support-annotations:23.1.0' } | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
implementation 'com.contentstack.sdk:utils:1.2.6' | ||
// implementation 'com.android.support:appcompat-v7:26.1.0' | ||
// implementation 'com.android.support:support-v4:26.1.0' | ||
implementation 'com.android.volley:volley:1.2.1' | ||
implementation 'androidx.test:core:1.5.0' | ||
implementation 'junit:junit:4.13.2' | ||
testImplementation 'junit:junit:4.13.2' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' | ||
androidTestImplementation 'androidx.test:core:1.5.0' | ||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' | ||
|
||
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
} | ||
tasks.register('clearJar', Delete) { delete 'build/libs/Contentstack.jar' } | ||
tasks.register('unzip', Copy) { | ||
def zipFile = file('build/intermediates/intermediate-jars/release/classes.jar') | ||
def outputDir = file("${buildDir}/contentstack-jar") | ||
from zipTree(zipFile) | ||
into outputDir | ||
} | ||
tasks.register('createJar', Jar) { | ||
archivesBaseName = "contentstack.jar" | ||
from('build/contentstack-jar/') | ||
include 'com/contentstack/' | ||
include 'META-INF/' | ||
} | ||
createJar.dependsOn(clearJar, unzip, build) | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.