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

(WIP): gradle updates #253

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
39 changes: 21 additions & 18 deletions android-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,33 @@ android {
}

dependencies {
compile project(':shared')
compile project(':datafile-handler')
compile project(':event-handler')
compile project(':user-profile')
compile ("com.optimizely.ab:core-api:$java_core_ver") {
implementation project(':shared')
implementation project(':datafile-handler')
implementation project(':event-handler')
implementation project(':user-profile')
implementation ("com.optimizely.ab:core-api:$java_core_ver") {
exclude group: 'com.google.code.findbugs'
}

compile "com.android.support:support-annotations:$support_annotations_ver"
compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'

testCompile "junit:junit:$junit_ver"
testCompile "org.mockito:mockito-core:$mockito_ver"
testCompile "com.noveogroup.android:android-logger:$android_logger_ver"
implementation "com.android.support:support-annotations:$support_annotations_ver"

androidTestCompile "com.android.support.test:runner:$support_test_runner_ver"
testImplementation "junit:junit:$junit_ver"
testImplementation "org.mockito:mockito-core:$mockito_ver"
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"

androidTestImplementation "com.android.support.test:runner:$support_test_runner_ver"
// Set this dependency to use JUnit 4 rules
androidTestCompile "com.android.support.test:rules:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:rules:$support_test_runner_ver"
// Set this dependency to build and run Espresso tests
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestCompile "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestCompile "com.google.code.gson:gson:$gson_ver"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.google.code.gson:gson:$gson_ver"
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
}

uploadArchives {
Expand All @@ -108,7 +111,7 @@ android.libraryVariants.all { variant ->

doFirst {
// First add all of your dependencies to the classpath, then add the android jars
classpath += files(variant.javaCompile.classpath.files)
classpath += files(variant.javaCompileProvider.classpath.files)
classpath += files(android.getBootClasspath())
}
// We're excluding these generated files
Expand Down
29 changes: 16 additions & 13 deletions datafile-handler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,25 @@ android {
}

dependencies {
compile project(':shared')
compile "com.android.support:support-annotations:$support_annotations_ver"
api project(':shared')
implementation "com.android.support:support-annotations:$support_annotations_ver"

testCompile "junit:junit:$junit_ver"
testCompile "org.mockito:mockito-core:$mockito_ver"
testCompile "com.noveogroup.android:android-logger:$android_logger_ver"
compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'

androidTestCompile "com.android.support.test:runner:$support_test_runner_ver"
testImplementation "junit:junit:$junit_ver"
testImplementation "org.mockito:mockito-core:$mockito_ver"
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"

androidTestImplementation "com.android.support.test:runner:$support_test_runner_ver"
// Set this dependency to use JUnit 4 rules
androidTestCompile "com.android.support.test:rules:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:rules:$support_test_runner_ver"
// Set this dependency to build and run Espresso tests
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestCompile "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
}

uploadArchives {
Expand All @@ -94,7 +97,7 @@ android.libraryVariants.all { variant ->

// First add all of your dependencies to the classpath, then add the android jars
doFirst {
classpath += files(variant.javaCompile.classpath.files)
classpath += files(variant.javaCompileProvider.classpath.files)
classpath += files(android.getBootClasspath())
}
// We're excluding these generated files
Expand Down
33 changes: 20 additions & 13 deletions event-handler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,29 @@ android {
}

dependencies {
compile project(':shared')
compile "com.android.support:support-annotations:$support_annotations_ver"
api project(':shared')
implementation "com.android.support:support-annotations:$support_annotations_ver"

testCompile "junit:junit:$junit_ver"
testCompile "org.mockito:mockito-core:$mockito_ver"
testCompile "com.noveogroup.android:android-logger:$android_logger_ver"
implementation ("com.optimizely.ab:core-api:$java_core_ver") {
exclude group: 'com.google.code.findbugs'
}

compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'

testImplementation "junit:junit:$junit_ver"
testImplementation "org.mockito:mockito-core:$mockito_ver"
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"

androidTestCompile "com.android.support.test:runner:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:runner:$support_test_runner_ver"
// Set this dependency to use JUnit 4 rules
androidTestCompile "com.android.support.test:rules:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:rules:$support_test_runner_ver"
// Set this dependency to build and run Espresso tests
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestCompile "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
}

uploadArchives {
Expand All @@ -95,7 +102,7 @@ android.libraryVariants.all { variant ->

// First add all of your dependencies to the classpath, then add the android jars
doFirst {
classpath += files(variant.javaCompile.classpath.files)
classpath += files(variant.javaCompileProvider.classpath.files)
classpath += files(android.getBootClasspath())
}
// We're excluding these generated files
Expand Down
35 changes: 19 additions & 16 deletions shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,34 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.1'
buildToolsVersion '28.0.3'
}

dependencies {
compile "com.noveogroup.android:android-logger:$android_logger_ver"
compile ("com.optimizely.ab:core-api:$java_core_ver") {
implementation "com.noveogroup.android:android-logger:$android_logger_ver"
implementation ("com.optimizely.ab:core-api:$java_core_ver") {
exclude group: 'com.google.code.findbugs'
}
compile "com.google.code.gson:gson:$gson_ver"
implementation "com.google.code.gson:gson:$gson_ver"

provided "com.android.support:support-annotations:$support_annotations_ver"
compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'

testCompile "junit:junit:$junit_ver"
testCompile "org.mockito:mockito-core:$mockito_ver"
testCompile "com.noveogroup.android:android-logger:$android_logger_ver"
compileOnly "com.android.support:support-annotations:$support_annotations_ver"

androidTestCompile "com.android.support.test:runner:$support_test_runner_ver"
testImplementation "junit:junit:$junit_ver"
testImplementation "org.mockito:mockito-core:$mockito_ver"
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"

androidTestImplementation "com.android.support.test:runner:$support_test_runner_ver"
// Set this dependency to use JUnit 4 rules
androidTestCompile "com.android.support.test:rules:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:rules:$support_test_runner_ver"
// Set this dependency to build and run Espresso tests
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestCompile "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
}

uploadArchives {
Expand All @@ -99,7 +102,7 @@ android.libraryVariants.all { variant ->

// First add all of your dependencies to the classpath, then add the android jars
doFirst {
classpath += files(variant.javaCompile.classpath.files)
classpath += files(variant.javaCompileProvider.classpath.files)
classpath += files(android.getBootClasspath())
}
// We're excluding these generated files
Expand Down
48 changes: 27 additions & 21 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,42 @@ android {

dependencies {
// Includes the Optimizely X Full Stack Java SDK, event handler, and user profile
compile (project(':android-sdk')) {
implementation (project(':android-sdk')) {
exclude group: 'com.google.code.gson', module:'gson'
exclude group: 'com.noveogroup.android', module:'android-logger'
}

// compile 'com.optimizely.ab:android-sdk:1.0.0'
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'com.android.support:design:28.0.0'
compileOnly "com.optimizely.ab:core-api:$java_core_ver"

compileOnly project(path: ':shared')
compileOnly project(path: ':event-handler')

// implementation 'com.optimizely.ab:android-sdk:1.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
// EXAMPLE REPLACE noveogroup android-looger with slf4j-android logger
// https://mvnrepository.com/artifact/org.slf4j/slf4j-android
compile group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'
implementation group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'
// EXAMPLE REPLACE gson json parsing with jackson-databind json parsing.
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'

testCompile "junit:junit:$junit_ver"
testCompile "org.mockito:mockito-core:$mockito_ver"
testCompile "com.noveogroup.android:android-logger:$android_logger_ver"
// testCompile 'com.optimizely.ab:android-sdk:1.0.0'
testCompile project(':android-sdk')
testImplementation "junit:junit:$junit_ver"
testImplementation "org.mockito:mockito-core:$mockito_ver"
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
// testImplementation 'com.optimizely.ab:android-sdk:1.0.0'
testImplementation project(':android-sdk')

androidTestCompile("com.android.support.test:runner:$support_test_runner_ver")
androidTestCompile "com.android.support:support-annotations:28.0.0"
androidTestImplementation("com.android.support.test:runner:$support_test_runner_ver")
androidTestImplementation "com.android.support:support-annotations:28.0.0"
// Set this dependency to use JUnit 4 rules
androidTestCompile "com.android.support.test:rules:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:rules:$support_test_runner_ver"
// Set this dependency to build and run Espresso tests
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
// androidTestCompile 'com.optimizely.ab:android-sdk:1.0.0'
androidTestCompile project(':android-sdk')
androidTestCompile project(path: ':shared')
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
// androidTestImplementation 'com.optimizely.ab:android-sdk:1.0.0'
androidTestImplementation project(':android-sdk')
androidTestImplementation project(path: ':shared')
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
}
33 changes: 20 additions & 13 deletions user-profile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,29 @@ android {
}

dependencies {
compile project(':shared')
provided "com.android.support:support-annotations:$support_annotations_ver"
api project(':shared')

testCompile "junit:junit:$junit_ver"
testCompile "org.mockito:mockito-core:$mockito_ver"
testCompile "com.noveogroup.android:android-logger:$android_logger_ver"
implementation ("com.optimizely.ab:core-api:$java_core_ver") {
exclude group: 'com.google.code.findbugs'
}

compileOnly "com.android.support:support-annotations:$support_annotations_ver"
compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25'

testImplementation "junit:junit:$junit_ver"
testImplementation "org.mockito:mockito-core:$mockito_ver"
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"

androidTestCompile "com.android.support.test:runner:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:runner:$support_test_runner_ver"
// Set this dependency to use JUnit 4 rules
androidTestCompile "com.android.support.test:rules:$support_test_runner_ver"
androidTestImplementation "com.android.support.test:rules:$support_test_runner_ver"
// Set this dependency to build and run Espresso tests
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestCompile "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_ver"
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
}

uploadArchives {
Expand All @@ -94,7 +101,7 @@ android.libraryVariants.all { variant ->

// First add all of your dependencies to the classpath, then add the android jars
doFirst {
classpath += files(variant.javaCompile.classpath.files)
classpath += files(variant.javaCompileProvider.classpath.files)
classpath += files(android.getBootClasspath())
}
// We're excluding these generated files
Expand Down