Skip to content

Commit a1f4104

Browse files
Merge branch 'master' into muzahidul-opti-patch-2
2 parents 394fc7b + 687f351 commit a1f4104

File tree

38 files changed

+290
-262
lines changed

38 files changed

+290
-262
lines changed

.github/workflows/android.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
lint_markdown_files:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020
- name: Set up Ruby
2121
uses: ruby/setup-ruby@v1
2222
with:
@@ -31,12 +31,12 @@ jobs:
3131
if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }}
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3535
with:
3636
# You should create a personal access token and store it in your repository
3737
token: ${{ secrets.CI_USER_TOKEN }}
38-
repository: 'optimizely/travisci-tools'
39-
path: 'home/runner/travisci-tools'
38+
repository: 'optimizely/ci-helper-tools'
39+
path: 'home/runner/ci-helper-tools'
4040
ref: 'master'
4141

4242
- name: set SDK Branch if PR
@@ -45,14 +45,12 @@ jobs:
4545
if: ${{ github.event_name == 'pull_request' }}
4646
run: |
4747
echo "SDK_BRANCH=$HEAD_REF" >> $GITHUB_ENV
48-
echo "TRAVIS_BRANCH=$HEAD_REF" >> $GITHUB_ENV
4948
- name: set SDK Branch if not pull request
5049
env:
5150
REF_NAME: ${{github.ref_name}}
5251
if: ${{ github.event_name != 'pull_request' }}
5352
run: |
5453
echo "SDK_BRANCH=$REF_NAME" >> $GITHUB_ENV
55-
echo "TRAVIS_BRANCH=$REF_NAME" >> $GITHUB_ENV
5654
- name: Trigger build
5755
env:
5856
SDK: android
@@ -68,12 +66,11 @@ jobs:
6866
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
6967
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
7068
UPSTREAM_SHA: ${{ github.sha }}
71-
TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
7269
EVENT_MESSAGE: ${{ github.event.message }}
7370
HOME: 'home/runner'
7471
run: |
7572
echo "$GITHUB_CONTEXT"
76-
home/runner/travisci-tools/trigger-script-with-status-update.sh
73+
home/runner/ci-helper-tools/trigger-script-with-status-update.sh
7774
build:
7875
uses: optimizely/android-sdk/.github/workflows/build.yml@master
7976
with:
@@ -87,11 +84,11 @@ jobs:
8784
api-level: [21, 25, 26, 29]
8885
steps:
8986
- name: checkout
90-
uses: actions/checkout@v2
91-
- name: set up JDK 11
87+
uses: actions/checkout@v4
88+
- name: set up JDK 17
9289
uses: actions/setup-java@v1
9390
with:
94-
java-version: 11
91+
java-version: '17'
9592
- name: Enable KVM
9693
run: |
9794
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -101,14 +98,14 @@ jobs:
10198
- name: Grant execute permission for gradlew
10299
run: chmod +x gradlew
103100
- name: Gradle cache
104-
uses: actions/cache@v2
101+
uses: actions/cache@v4
105102
with:
106103
path: |
107104
~/.gradle/caches
108105
~/.gradle/wrapper
109106
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
110107
- name: AVD cache
111-
uses: actions/cache@v2
108+
uses: actions/cache@v4
112109
id: avd-cache
113110
with:
114111
path: |
@@ -135,13 +132,13 @@ jobs:
135132
force-avd-creation: false
136133
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
137134
disable-animations: true
138-
script: ./gradlew testAllModulesTravis
135+
script: ./gradlew testAllModules
139136
publish:
140137
if: startsWith(github.ref, 'refs/tags/')
141138
uses: optimizely/android-sdk/.github/workflows/build.yml@master
142139
with:
143140
action: ship
144-
travis_tag: ${GITHUB_REF#refs/*/}
141+
github_tag: ${GITHUB_REF#refs/*/}
145142
secrets:
146143
MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }}
147144
MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }}
@@ -153,7 +150,7 @@ jobs:
153150
uses: optimizely/android-sdk/.github/workflows/build.yml@master
154151
with:
155152
action: ship
156-
travis_tag: BB-SNAPSHOT
153+
github_tag: BB-SNAPSHOT
157154
secrets:
158155
MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }}
159156
MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }}

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
action:
77
required: true
88
type: string
9-
travis_tag:
9+
github_tag:
1010
required: false
1111
type: string
1212
secrets:
@@ -23,10 +23,10 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v2
26-
- name: set up JDK 11
26+
- name: set up JDK 17
2727
uses: actions/setup-java@v2
2828
with:
29-
java-version: '11'
29+
java-version: '17'
3030
distribution: 'temurin'
3131
cache: gradle
3232
- name: Grant execute permission for gradlew
@@ -39,4 +39,4 @@ jobs:
3939
MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }}
4040
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
4141
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
42-
run: TRAVIS_TAG=${{ inputs.travis_tag }} ./gradlew ${{ inputs.action }}
42+
run: GITHUB_TAG=${{ inputs.github_tag }} ./gradlew ${{ inputs.action }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ We welcome contributions and feedback! All contributors must sign our [Contribut
1313
7. Open a pull request from `YOUR_NAME/branch_name` to `master`.
1414
8. A repository maintainer will review your pull request and, if all goes well, squash and merge it!
1515

16-
All branches will be built and run against the entire test suite on Travis with every commit.
16+
All branches will be built and run against the entire test suite on Gtihub Actions with every commit.
1717

1818
The `test-app` module is built against a real Optimizely project. Changing the project ID will cause tests to fail. The test app should be used as a reference.
1919

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Optimizely Android SDK
22
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)
3-
[![Build Status](https://travis-ci.org/optimizely/android-sdk.svg?branch=master)](https://travis-ci.org/optimizely/android-sdk)
43

54
This repository houses the Android SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy). The Android SDK depends on the [Optimizely Java SDK](https://github.com/optimizely/java-sdk).
65

android-sdk/build.gradle

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ android {
3434
}
3535
testOptions {
3636
unitTests.returnDefaultValues = true
37+
unitTests.all {
38+
jvmArgs = [
39+
"--add-opens","java.base/java.lang.reflect=ALL-UNNAMED",
40+
"--add-opens","java.base/java.util.concurrent=ALL-UNNAMED",
41+
"--add-opens","java.base/java.util.concurrent.locks=ALL-UNNAMED",
42+
"--add-opens","java.base/java.util=ALL-UNNAMED",
43+
"--add-opens","java.base/java.lang=ALL-UNNAMED"
44+
]
45+
}
3746
}
3847
buildTypes {
3948
release {
@@ -45,8 +54,8 @@ android {
4554
}
4655

4756
compileOptions {
48-
sourceCompatibility JavaVersion.VERSION_11
49-
targetCompatibility JavaVersion.VERSION_11
57+
sourceCompatibility JavaVersion.VERSION_17
58+
targetCompatibility JavaVersion.VERSION_17
5059
}
5160
}
5261

@@ -64,7 +73,8 @@ dependencies {
6473
implementation "androidx.annotation:annotation:$annotations_ver"
6574

6675
testImplementation "junit:junit:$junit_ver"
67-
testImplementation "org.mockito:mockito-core:$mockito_ver"
76+
testImplementation "org.mockito:mockito-core:$mockito_ver_sdk_module"
77+
6878
testImplementation "org.powermock:powermock-module-junit4:$powermock_ver"
6979
testImplementation "org.powermock:powermock-api-mockito2:$powermock_ver"
7080
testImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
@@ -78,9 +88,7 @@ dependencies {
7888
androidTestImplementation "androidx.test:core-ktx:$androidx_test_core"
7989

8090
androidTestImplementation "org.mockito:mockito-core:$mockito_ver"
81-
androidTestImplementation "com.crittercism.dexmaker:dexmaker:$dexmaker_ver"
82-
androidTestImplementation "com.crittercism.dexmaker:dexmaker-dx:$dexmaker_ver"
83-
androidTestImplementation "com.crittercism.dexmaker:dexmaker-mockito:$dexmaker_ver"
91+
androidTestImplementation "org.mockito:mockito-android:$mockito_ver"
8492
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
8593
androidTestImplementation "com.google.code.gson:gson:$gson_ver"
8694
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion"

android-sdk/src/androidTest/java/com/optimizely/ab/android/sdk/ODPIntegrationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
import static junit.framework.Assert.assertNull;
4343
import static junit.framework.Assert.assertTrue;
4444
import static junit.framework.Assert.fail;
45-
import static org.mockito.Matchers.any;
46-
import static org.mockito.Matchers.anyString;
47-
import static org.mockito.Matchers.eq;
45+
import static org.mockito.ArgumentMatchers.any;
46+
import static org.mockito.ArgumentMatchers.anyString;
47+
import static org.mockito.ArgumentMatchers.eq;
4848
import static org.mockito.Mockito.mock;
4949
import static org.mockito.Mockito.spy;
5050
import static org.mockito.Mockito.times;

android-sdk/src/androidTest/java/com/optimizely/ab/android/sdk/ODPIntegrationUpdateConfigTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
import static junit.framework.Assert.assertNull;
5252
import static junit.framework.Assert.assertTrue;
5353
import static junit.framework.Assert.fail;
54-
import static org.mockito.Matchers.any;
55-
import static org.mockito.Matchers.anyString;
56-
import static org.mockito.Matchers.eq;
54+
import static org.mockito.ArgumentMatchers.any;
55+
import static org.mockito.ArgumentMatchers.anyString;
56+
import static org.mockito.ArgumentMatchers.eq;
5757
import static org.mockito.Mockito.mock;
5858
import static org.mockito.Mockito.spy;
5959
import static org.mockito.Mockito.times;

0 commit comments

Comments
 (0)