Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Feb 22, 2024
1 parent 127ee04 commit 3b65eef
Show file tree
Hide file tree
Showing 119 changed files with 32,063 additions and 504 deletions.
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2024 PubMatic Inc


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software and you shall comply with the instance of 3rd party license linked here: https://github.com/facebook/react-native/blob/main/LICENSE

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
## react-native-openwrap-sdk
# OpenWrap SDK

- This folder contains the react-native plugin for the OpenWrap SDK. OpenWrap SDK lets publishers leverage the power of OpenWrap to request multiple programmatic bids for their mobile in-app inventory.
For more details refer [here](react-native-openwrap-sdk/README.md).
OpenWrap SDK lets publishers leverage the power of OpenWrap to request multiple programmatic bids for their mobile in-app inventory. OpenWrap sends an initial ad call that goes out to OpenWrap partners requesting bids. When OpenWrap programmatically arrives at the winning bid, it returns the ad to OpenWrap SDK to render it in your app.

## GAMSampleApp
## Benefits

- This folder demonstrates the use of OpenWrap SDK via GAM Header bidding. Publisher can refer to this sample app and implement the GAM Header bidding in their application.
For more details refer [here](GAMSampleApp/README.md).
- All the demand sources bid at the same time, replacing the sequential preferential ordering of buyers.
- Advertisers have the chance to obtain the best ad inventory.
- Publishers can potentially see up to a 50% monetization increase.

## Get started with OpenWrap SDK React Native plugin

To integrate OpenWrap SDK React Native plugin checkout [this](https://help.pubmatic.com/openwrap/docs/about-react-native-plugin)

## License

- See [LICENSE](https://github.com/PubMatic/react-native-openwrap-sdk/LICENSE)
28 changes: 28 additions & 0 deletions react-native-openwrap-sdk/.github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Setup
description: Setup Node.js and install dependencies

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn install --cwd example --frozen-lockfile
yarn install --frozen-lockfile
shell: bash
151 changes: 151 additions & 0 deletions react-native-openwrap-sdk/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Lint files
run: yarn lint

- name: Typecheck files
run: yarn typecheck

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Build package
run: yarn prepack

build-android:
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-
- name: Check turborepo cache for Android
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build example for Android
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
build-ios:
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-
- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
yarn example pods
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
21 changes: 0 additions & 21 deletions react-native-openwrap-sdk/LICENSE

This file was deleted.

4 changes: 2 additions & 2 deletions react-native-openwrap-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ OpenWrap SDK lets publishers leverage the power of OpenWrap to request multiple

## Get started with OpenWrap SDK React Native plugin

To integrate OpenWrap SDK React Native plugin checkout [this](https://community.pubmatic.com/display/RN/Get+started+with+OpenWrap+SDK+React+Native+plugin)
To integrate OpenWrap SDK React Native plugin checkout [this](https://help.pubmatic.com/openwrap/docs/about-react-native-plugin)

## License

- See [LICENSE](https://github.com/PubMatic/react-native-openwrap-sdk/blob/main/LICENSE)
- See [LICENSE](https://github.com/PubMatic/react-native-openwrap-sdk/LICENSE)
11 changes: 10 additions & 1 deletion react-native-openwrap-sdk/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ rootProject.allprojects {
maven {
url 'https://repo.pubmatic.com/artifactory/public-repos'
}
jcenter()
}
}

Expand All @@ -87,13 +88,21 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

// Include PubMatic OpenWrap SDK
implementation "com.pubmatic.sdk:openwrap:3.1.0"
implementation "com.pubmatic.sdk:openwrap:3.4.0"

// Include play services Android Advertising Id client library
implementation "com.google.android.gms:play-services-ads-identifier:18.0.1"

// Test implementation
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:4.0.0'
testImplementation 'org.json:json:20180813'
testImplementation 'org.mockito:mockito-inline:2.13.0'
testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.6'

}

if (isNewArchitectureEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<manifest package="com.pubmatic.sdk.openwrap.reactnative">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pubmatic.sdk.openwrap.reactnative">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Loading

0 comments on commit 3b65eef

Please sign in to comment.