From 3e73d76ce045290e53a17a9867312c1497541fc8 Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:25:24 +0200 Subject: [PATCH 1/9] test commit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c390b6f1c..93d35ed67 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ Easily include the Prebid Mobile SDK using Maven. Simply add this line to your g implementation 'org.prebid:prebid-mobile-sdk:1.12.1' ``` - ## Build from source Build Prebid Mobile from source code. After cloning the repo, from the root directory run From 0f26c838d143aca59c2ca3c46dbecce04b5fcac8 Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:28:20 +0200 Subject: [PATCH 2/9] add config file --- .circleci/build.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .circleci/build.yml diff --git a/.circleci/build.yml b/.circleci/build.yml new file mode 100644 index 000000000..404f3315b --- /dev/null +++ b/.circleci/build.yml @@ -0,0 +1,49 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference +# For a detailed guide to building and testing on Android, read the docs: +# https://circleci.com/docs/2.0/language-android/ for more details. +version: 2.1 + +# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. +# See: https://circleci.com/docs/2.0/orb-intro/ +orbs: + android: circleci/android@1.0.3 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + # Below is the definition of your job to build and test your app, you can rename and customize it as you want. + build-and-test: + # These next lines define the Android machine image executor. + # See: https://circleci.com/docs/2.0/executor-types/ + executor: + name: android/android-machine + + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + # Checkout the code as the first step. + - checkout + + # The next step will run the unit tests + - android/run-tests: + test-command: ./gradlew lint testDebug --continue + + # Then start the emulator and run the Instrumentation tests! + - android/start-emulator-and-run-tests: + test-command: ./gradlew connectedDebugAndroidTest + system-image: system-images;android-25;google_apis;x86 + + # And finally run the release build + - run: + name: Assemble release build + command: | + ./gradlew assembleRelease + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + sample: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - build-and-test From 240cb9a6f4ae82b23e6183c7ebcf52d2a649453e Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:29:53 +0200 Subject: [PATCH 3/9] rename file --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..404f3315b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference +# For a detailed guide to building and testing on Android, read the docs: +# https://circleci.com/docs/2.0/language-android/ for more details. +version: 2.1 + +# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. +# See: https://circleci.com/docs/2.0/orb-intro/ +orbs: + android: circleci/android@1.0.3 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + # Below is the definition of your job to build and test your app, you can rename and customize it as you want. + build-and-test: + # These next lines define the Android machine image executor. + # See: https://circleci.com/docs/2.0/executor-types/ + executor: + name: android/android-machine + + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + # Checkout the code as the first step. + - checkout + + # The next step will run the unit tests + - android/run-tests: + test-command: ./gradlew lint testDebug --continue + + # Then start the emulator and run the Instrumentation tests! + - android/start-emulator-and-run-tests: + test-command: ./gradlew connectedDebugAndroidTest + system-image: system-images;android-25;google_apis;x86 + + # And finally run the release build + - run: + name: Assemble release build + command: | + ./gradlew assembleRelease + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + sample: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - build-and-test From 56a8595823b31aba7e4a96695153102f47ef0e0a Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:30:41 +0200 Subject: [PATCH 4/9] remove old file --- .circleci/build.yml | 49 --------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 .circleci/build.yml diff --git a/.circleci/build.yml b/.circleci/build.yml deleted file mode 100644 index 404f3315b..000000000 --- a/.circleci/build.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference -# For a detailed guide to building and testing on Android, read the docs: -# https://circleci.com/docs/2.0/language-android/ for more details. -version: 2.1 - -# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. -# See: https://circleci.com/docs/2.0/orb-intro/ -orbs: - android: circleci/android@1.0.3 - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - # Below is the definition of your job to build and test your app, you can rename and customize it as you want. - build-and-test: - # These next lines define the Android machine image executor. - # See: https://circleci.com/docs/2.0/executor-types/ - executor: - name: android/android-machine - - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - # Checkout the code as the first step. - - checkout - - # The next step will run the unit tests - - android/run-tests: - test-command: ./gradlew lint testDebug --continue - - # Then start the emulator and run the Instrumentation tests! - - android/start-emulator-and-run-tests: - test-command: ./gradlew connectedDebugAndroidTest - system-image: system-images;android-25;google_apis;x86 - - # And finally run the release build - - run: - name: Assemble release build - command: | - ./gradlew assembleRelease - -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows -workflows: - sample: # This is the name of the workflow, feel free to change it to better match your workflow. - # Inside the workflow, you define the jobs you want to run. - jobs: - - build-and-test From dd250ca9ff24ce843d306d6904ccd3692a3a1a1d Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:37:55 +0200 Subject: [PATCH 5/9] run build script --- .circleci/config.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 404f3315b..943c98a7e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,21 +24,11 @@ jobs: steps: # Checkout the code as the first step. - checkout - - # The next step will run the unit tests - - android/run-tests: - test-command: ./gradlew lint testDebug --continue - - # Then start the emulator and run the Instrumentation tests! - - android/start-emulator-and-run-tests: - test-command: ./gradlew connectedDebugAndroidTest - system-image: system-images;android-25;google_apis;x86 - + # And finally run the release build - run: - name: Assemble release build - command: | - ./gradlew assembleRelease + name: Build Frameworks + command: scripts buildPrebidMobile.sh # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows From 186123bbe32343e34cef37bdfbb19eb48605dca7 Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:39:30 +0200 Subject: [PATCH 6/9] fix typo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 943c98a7e..8bd1c2b00 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: # And finally run the release build - run: name: Build Frameworks - command: scripts buildPrebidMobile.sh + command: scripts/buildPrebidMobile.sh # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows From 84a4aed60f62c1ec464f3350ff0b692114272222 Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 11:57:03 +0200 Subject: [PATCH 7/9] add the test step --- .circleci/config.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8bd1c2b00..59bec0500 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ orbs: # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: # Below is the definition of your job to build and test your app, you can rename and customize it as you want. - build-and-test: + build: # These next lines define the Android machine image executor. # See: https://circleci.com/docs/2.0/executor-types/ executor: @@ -29,6 +29,24 @@ jobs: - run: name: Build Frameworks command: scripts/buildPrebidMobile.sh + + # Below is the definition of your job to build and test your app, you can rename and customize it as you want. + test: + # These next lines define the Android machine image executor. + # See: https://circleci.com/docs/2.0/executor-types/ + executor: + name: android/android-machine + + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + # Checkout the code as the first step. + - checkout + + # And finally run the release build + - run: + name: Test Frameworks + command: scripts/testPrebidMobile.sh # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows From 2bde69b7c8c2e1f46e24f3fb62b7d459ac1257cf Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 15:59:34 +0200 Subject: [PATCH 8/9] use proper steps --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 59bec0500..ecea48b5a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,4 +54,5 @@ workflows: sample: # This is the name of the workflow, feel free to change it to better match your workflow. # Inside the workflow, you define the jobs you want to run. jobs: - - build-and-test + - build + - test From d04617d6d770d629ed92833fa21e681729e8ed92 Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 17 Feb 2022 16:38:55 +0200 Subject: [PATCH 9/9] small corrections for the build script --- scripts/buildPrebidMobile.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/buildPrebidMobile.sh b/scripts/buildPrebidMobile.sh index c5aa6bb7c..3786302ca 100755 --- a/scripts/buildPrebidMobile.sh +++ b/scripts/buildPrebidMobile.sh @@ -83,6 +83,7 @@ modules=( "PrebidMobile-mopubAdapters" "PrebidMobile-admobAdapters" ) + projectPaths=( "$BASEDIR/PrebidMobile" "$BASEDIR/PrebidMobile/PrebidMobile-core" @@ -101,7 +102,7 @@ for n in ${!modules[@]}; do # clean existing build results, exclude test task, and assemble new release build (./gradlew -i --no-daemon ${modules[$n]}:assembleRelease > $LOGPATH/build.log 2>&1 || die "Build failed, check log in $LOGPATH/build.log" ) - # Make folder generated/temp/output + # Make folder generated/temp/output echoX "Packaging ${modules[$n]}" mkdir $TEMPDIR cd $TEMPDIR @@ -185,13 +186,14 @@ mkdir $TEMPDIR cd $TEMPDIR; -unzip -uo $OUTDIR/omsdk.jar -unzip -uo $OUTDIR/PrebidMobile.jar -unzip -uo $OUTDIR/PrebidMobile-core.jar -unzip -uo $OUTDIR/PrebidMobile-rendering.jar +unzip -qq -uo $OUTDIR/omsdk.jar +unzip -qq -uo $OUTDIR/PrebidMobile.jar +unzip -qq -uo $OUTDIR/PrebidMobile-core.jar +unzip -qq -uo $OUTDIR/PrebidMobile-rendering.jar # unzip second proguard -unzip -B $OUTDIR/PrebidMobile.jar "META-INF/proguard/proguard.pro" +unzip -qq -B $OUTDIR/PrebidMobile.jar "META-INF/proguard/proguard.pro" + # append text from second proguard cat "$TEMPDIR/META-INF/proguard/proguard.pro~" >> "$TEMPDIR/META-INF/proguard/proguard.pro" rm "$TEMPDIR/META-INF/proguard/proguard.pro~"