diff --git a/.gitignore b/.gitignore index f86dd9f4..74484c94 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,21 @@ ci/ **/.idea/ # Secrets -**/*/values/secrets.xml \ No newline at end of file +**/*/values/secrets.xml + +# Local configuration file (sdk path, etc) +local.properties + +# Android Studio Navigation editor temp files +.navigation/ + +# Coverage tools +jacoco.exec + +# Application files +*.apk +*.aar +*.aab + +# Dex files for ART/Dalvik VM +*.dex \ No newline at end of file diff --git a/code/app/build.gradle b/code/app/build.gradle index c3abf6ab..47354225 100644 --- a/code/app/build.gradle +++ b/code/app/build.gradle @@ -1,7 +1,8 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: "com.diffplug.spotless" +plugins { + id 'com.android.application' + id 'com.diffplug.spotless' + id 'org.jetbrains.kotlin.android' +} spotless { kotlin { @@ -12,14 +13,16 @@ spotless { } android { - compileSdkVersion 31 + namespace 'com.adobe.marketing.edge.identity.app' + + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.adobe.marketing.edge.identity.app" - minSdkVersion 19 - targetSdkVersion 31 - versionCode 1 - versionName "1.0" + minSdk rootProject.ext.minSdkVersion + targetSdk rootProject.ext.targetSdkVersion + versionCode rootProject.ext.versionCode + versionName project.property('moduleVersion') as String ?: "1.0.0 (Default)" multiDexEnabled = true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -35,14 +38,14 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { - jvmTarget = '1.8' + jvmTarget = rootProject.ext.kotlinJvmTarget } } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.ext.kotlinVersion}" implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' diff --git a/code/app/src/main/AndroidManifest.xml b/code/app/src/main/AndroidManifest.xml index 18386222..a11edc9a 100644 --- a/code/app/src/main/AndroidManifest.xml +++ b/code/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ - + +afterEvaluate { tasks.withType(Javadoc) { - source = [android.sourceSets.main.java.sourceFiles, android.sourceSets.phone.java.sourceFiles] - ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" + source = android.sourceSets.main.java.srcDirs + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + classpath += files(android.libraryVariants.collect { variant -> + variant.javaCompileProvider.get().classpath.files + }) - doFirst{classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)} - - exclude "**/BuildConfig.java" - exclude "**/R.java" options { + source = "8" links "https://developer.android.com/reference" } } @@ -113,39 +118,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 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 @@ -156,7 +128,7 @@ publishing { pom { name = mavenRepoName description = mavenRepoDescription - url = 'https://aep-sdks.gitbook.io' + url = 'https://developer.adobe.com/client-sdks' licenses { license { name = 'Adobe Proprietary' @@ -170,9 +142,9 @@ publishing { } } scm { - connection = 'scm:git:github.com//Adobe-Marketing-Cloud/acp-sdks.git' - developerConnection = 'scm:git:ssh://github.com//Adobe-Marketing-Cloud/acp-sdks.git' - url = 'https://github.com/Adobe-Marketing-Cloud/acp-sdks' + connection = 'scm:git:github.com//adobe/aepsdk-edgeidentity-android.git' + developerConnection = 'scm:git:ssh://github.com//adobe/aepsdk-edgeidentity-android.git' + url = 'https://github.com/adobe/aepsdk-edgeidentity-android' } withXml { def dependenciesNode = asNode().appendNode('dependencies') @@ -212,23 +184,23 @@ signing { } task platformUnitTestJacocoReport(type: JacocoReport, dependsOn: "testPhoneDebugUnitTest") { - 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) additionalClassDirs.setFrom files([debugTree]) additionalSourceDirs.setFrom files(android.sourceSets.main.java.sourceFiles) sourceDirectories.setFrom files(android.sourceSets.phone.java.sourceFiles) - executionData "$buildDir/jacoco/testPhoneDebugUnitTest.exec" + 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) additionalClassDirs.setFrom files([debugTree]) @@ -239,15 +211,13 @@ 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' // Adobe Mobile SDK Core implementation "com.adobe.marketing.mobile:core:${rootProject.mavenCoreVersion}" diff --git a/code/edgeidentity/src/main/AndroidManifest.xml b/code/edgeidentity/src/main/AndroidManifest.xml index 653c8ae3..61363294 100644 --- a/code/edgeidentity/src/main/AndroidManifest.xml +++ b/code/edgeidentity/src/main/AndroidManifest.xml @@ -1,3 +1 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/code/gradle.properties b/code/gradle.properties index 746b503c..8f211c79 100644 --- a/code/gradle.properties +++ b/code/gradle.properties @@ -4,6 +4,7 @@ org.gradle.jvmargs=-Xmx2048m android.useAndroidX=true android.enableJetifier=true +android.disableAutomaticComponentCreation=true moduleProjectName=edgeidentity moduleName=edgeidentity diff --git a/code/gradle/wrapper/gradle-wrapper.properties b/code/gradle/wrapper/gradle-wrapper.properties index df944bc5..5e4cdd73 100644 --- a/code/gradle/wrapper/gradle-wrapper.properties +++ b/code/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Mar 18 11:50:52 PDT 2022 +#Mon Nov 07 08:48:57 PST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/code/settings.gradle b/code/settings.gradle index fa1b7708..bb5f0304 100644 --- a/code/settings.gradle +++ b/code/settings.gradle @@ -1,3 +1,20 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + } +} + include ':app' include ':edgeidentity' rootProject.name = "edgeidentity-sdk" \ No newline at end of file