Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade AGP, Gradle, language dependencies #75

Merged
merged 7 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions code/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ spotless {
android {
namespace 'com.adobe.marketing.edge.identity.app'

compileSdkVersion rootProject.ext.compileSdkVersion
compileSdk rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "com.adobe.marketing.edge.identity.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdkVersion
targetSdk rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName project.property('moduleVersion') as String ?: "1.0"
versionName project.property('moduleVersion') as String ?: "1.0.0 (Default)"
multiDexEnabled = true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -45,7 +45,6 @@ android {
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.ext.kotlinVersion}"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
Expand Down
6 changes: 3 additions & 3 deletions code/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'com.diffplug.gradle.spotless' version '6.11.0' apply false
prudrabhat marked this conversation as resolved.
Show resolved Hide resolved
id 'org.jetbrains.kotlin.android' version "1.6.21" apply false
}
Expand All @@ -23,7 +23,7 @@ ext {
kotlinJvmTarget = "1.8"

// test dependencies
junitVersion = "1.1.2"
junitVersion = "1.1.3"
mockitoCoreVersion = "2.28.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
53 changes: 10 additions & 43 deletions code/edgeidentity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
cacheung marked this conversation as resolved.
Show resolved Hide resolved
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdkVersion
targetSdk rootProject.ext.targetSdkVersion

prudrabhat marked this conversation as resolved.
Show resolved Hide resolved
testInstrumentationRunner rootProject.ext.testInstrumentationRunner
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -46,6 +46,7 @@ android {
buildTypes {
debug {
testCoverageEnabled true
debuggable true
}

release {
Expand Down Expand Up @@ -116,39 +117,6 @@ publish.dependsOn('assemblePhone')

publishing {
publications {
aar(MavenPublication) {
groupId = 'com.adobe.marketing.mobile'
artifactId = rootProject.moduleName
version = rootProject.moduleVersion
artifact("$buildDir/outputs/aar/${rootProject.moduleAARName}")
artifact javadocPublish
pom.withXml {
asNode().appendNode('name', mavenRepoName)
asNode().appendNode('description', mavenRepoDescription)
asNode().appendNode('url', 'https://aep-sdks.gitbook.io/docs/')
def scmNode = asNode().appendNode('scm')
scmNode.appendNode('url', 'https://github.com/Adobe-Marketing-Cloud/acp-sdks/')


def developersNode = asNode().appendNode('developers')
def developerNode = developersNode.appendNode('developer')
developerNode.appendNode('id', 'adobe')
developerNode.appendNode('name', 'adobe')

def licensesNode = asNode().appendNode('licenses')
def licenseNode = licensesNode.appendNode('license')
licenseNode.appendNode('name', 'Adobe Proprietary')

def dependenciesNode = asNode().appendNode('dependencies')

//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each

def coreDependencyNode = dependenciesNode.appendNode('dependency')
coreDependencyNode.appendNode('groupId', 'com.adobe.marketing.mobile')
coreDependencyNode.appendNode('artifactId', 'core')
coreDependencyNode.appendNode('version', mavenCoreVersion)
}
}
release(MavenPublication) {
groupId = 'com.adobe.marketing.mobile'
artifactId = rootProject.moduleName
Expand Down Expand Up @@ -224,14 +192,14 @@ task platformUnitTestJacocoReport(type: JacocoReport, dependsOn: "testPhoneDebug
executionData "$buildDir/outputs/unit_test_code_coverage/phoneDebugUnitTest/testPhoneDebugUnitTest.exec"

reports {
xml.enabled true
csv.enabled false
html.enabled true
xml.required = true
csv.required = false
html.required = true
}
}

task platformFunctionalTestJacocoReport(type: JacocoReport, dependsOn: "createPhoneDebugCoverageReport") {
def excludeRegex = ['**/ADB*.class', '**/BuildConfig.class']
def excludeRegex = ['**/BuildConfig.class']
def debugTree = fileTree(dir: "${project.buildDir}/intermediates/javac/phoneDebug/classes/com/adobe/marketing/mobile", excludes: excludeRegex)
cacheung marked this conversation as resolved.
Show resolved Hide resolved

additionalClassDirs.setFrom files([debugTree])
Expand All @@ -242,13 +210,12 @@ task platformFunctionalTestJacocoReport(type: JacocoReport, dependsOn: "createPh
])

reports {
xml.enabled true
csv.enabled false
html.enabled true
xml.required = true
csv.required = false
html.required = true
}
}


dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'

Expand Down