Skip to content

Commit

Permalink
Preparation for release (#433)
Browse files Browse the repository at this point in the history
* feat: update sdk version to 2.0.0

* fix: fix deploy problem with MAX adapters

Fix some imports.

* fix: add min size fields

* fix: add min size to multi-format in app case

* fix: add listener for Video Banner
  • Loading branch information
ValentinPostindustria authored Apr 29, 2022
1 parent 236963d commit d90c622
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Example/PrebidDemoJava/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies {
implementation project(':PrebidMobile')

// For testing staging releases
// implementation 'org.prebid:prebid-mobile-sdk:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk:2.0.0'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.gms:play-services-ads:20.4.0'
Expand Down
8 changes: 4 additions & 4 deletions Example/PrebidDemoKotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ dependencies {
implementation project(':PrebidMobile-maxAdapters')

// For testing staging releases
// implementation 'org.prebid:prebid-mobile-sdk:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk-gam-event-handlers:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk-admob-adapters:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk-max-adapters:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk:2.0.0'
// implementation 'org.prebid:prebid-mobile-sdk-gam-event-handlers:2.0.0'
// implementation 'org.prebid:prebid-mobile-sdk-admob-adapters:2.0.0'
// implementation 'org.prebid:prebid-mobile-sdk-max-adapters:2.0.0'

// Standard libraries
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package org.prebid.mobile.prebidkotlindemo.ads.inapp

import android.util.Log
import android.view.ViewGroup
import org.prebid.mobile.AdSize
import org.prebid.mobile.PrebidMobile
import org.prebid.mobile.api.data.VideoPlacementType
import org.prebid.mobile.api.exceptions.AdException
import org.prebid.mobile.api.rendering.BannerView
import org.prebid.mobile.api.rendering.listeners.BannerViewListener

object InAppVideoBanner {

private val TAG = InAppVideoBanner::class.simpleName

private var bannerView: BannerView? = null

fun create(
Expand All @@ -23,12 +28,31 @@ object InAppVideoBanner {
configId,
AdSize(width, height)
)
wrapper.addView(bannerView)
PrebidMobile.setStoredAuctionResponse(storedAuctionResponse)

bannerView?.videoPlacementType = VideoPlacementType.IN_BANNER
bannerView?.setAutoRefreshDelay(autoRefreshTime)
bannerView?.setBannerListener(object : BannerViewListener {
override fun onAdLoaded(bannerView: BannerView?) {
Log.d(TAG, "Ad loaded")
InAppVideoBanner.bannerView?.invalidate()
}

override fun onAdDisplayed(bannerView: BannerView?) {
Log.d(TAG, "Displayed")
}

override fun onAdFailed(bannerView: BannerView?, exception: AdException?) {
Log.e(TAG, "Ad failed: ${exception?.message}")
}

override fun onAdClicked(bannerView: BannerView?) {}

override fun onAdClosed(bannerView: BannerView?) {}

})
bannerView?.loadAd()

wrapper.addView(bannerView)
}

fun destroy() {
Expand Down
8 changes: 4 additions & 4 deletions Example/PrebidInternalTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ dependencies {
implementation project(':PrebidMobile-maxAdapters')

// For testing staging releases
// implementation 'org.prebid:prebid-mobile-sdk:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk-gam-event-handlers:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk-admob-adapters:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk-max-adapters:2.0.0-beta1'
// implementation 'org.prebid:prebid-mobile-sdk:2.0.0'
// implementation 'org.prebid:prebid-mobile-sdk-gam-event-handlers:2.0.0'
// implementation 'org.prebid:prebid-mobile-sdk-admob-adapters:2.0.0'
// implementation 'org.prebid:prebid-mobile-sdk-max-adapters:2.0.0'

// Base dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.prebid.mobile.renderingtestapp.plugplay.bidding.admob

import android.os.Bundle
import org.prebid.mobile.admob.AdMobMediationInterstitialUtils
import org.prebid.mobile.rendering.bidding.display.MediationInterstitialAdUnit
import org.prebid.mobile.rendering.bidding.enums.AdUnitFormat
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.mediation.MediationInterstitialAdUnit
import java.util.*

open class AdMobInterstitialMultiformatFragment : AdMobInterstitialFragment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

package org.prebid.mobile.renderingtestapp.plugplay.bidding.gam

import org.prebid.mobile.AdSize
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.rendering.InterstitialAdUnit
import org.prebid.mobile.eventhandlers.GamInterstitialEventHandler
import org.prebid.mobile.rendering.bidding.enums.AdUnitFormat
import org.prebid.mobile.rendering.bidding.parallel.InterstitialAdUnit
import org.prebid.mobile.renderingtestapp.plugplay.bidding.base.BaseBidInterstitialFragment
import java.util.*

Expand All @@ -38,5 +39,6 @@ open class GamInterstitialMultiformatFragment : BaseBidInterstitialFragment() {
interstitialEventHandler
)
interstitialAdUnit?.setInterstitialAdUnitListener(this)
interstitialAdUnit?.setMinSizePercentage(AdSize(30, 30))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class MaxBannerFragmentAdaptive : MaxBannerFragment() {
adView?.setExtraParameter("adaptive_banner", "true")
viewContainer.addView(adView)

val mediationUtils =
MaxMediationBannerUtils(adView)
val mediationUtils = MaxMediationBannerUtils(adView)
adUnit = MediationBannerAdUnit(
requireContext(),
configId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.prebid.mobile.renderingtestapp.plugplay.bidding.max

import com.applovin.mediation.adapters.prebid.utils.MaxMediationInterstitialUtils
import com.applovin.mediation.ads.MaxInterstitialAd
import org.prebid.mobile.api.mediation.MediationInterstitialAdUnit
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.mediation.MediationInterstitialAdUnit
import java.util.*

class MaxInterstitialFragmentMultiformat : MaxInterstitialFragment() {
Expand All @@ -22,6 +22,7 @@ class MaxInterstitialFragmentMultiformat : MaxInterstitialFragment() {
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO),
mediationUtils
)
adUnit?.setMinSizePercentage(30, 30)
return adUnit
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

package org.prebid.mobile.renderingtestapp.plugplay.bidding.ppm

import org.prebid.mobile.rendering.bidding.enums.AdUnitFormat
import org.prebid.mobile.rendering.bidding.parallel.InterstitialAdUnit
import org.prebid.mobile.AdSize
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.rendering.InterstitialAdUnit
import org.prebid.mobile.renderingtestapp.plugplay.bidding.base.BaseBidInterstitialFragment
import java.util.*

Expand All @@ -29,5 +30,6 @@ open class PpmInterstitialMultiformatFragment : BaseBidInterstitialFragment() {
interstitialAdUnit =
InterstitialAdUnit(requireContext(), configId, EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO))
interstitialAdUnit?.setInterstitialAdUnitListener(this)
interstitialAdUnit?.setMinSizePercentage(AdSize(30, 30))
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
prebidVersionName = "2.0.0-beta1"
prebidVersionName = "2.0.0"
prebidVersionCode = 1
minSDKVersion = 16
targetSDKVersion = 28
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-admobAdapters-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-admob-adapters</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>

<packaging>jar</packaging>
<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion scripts/Maven/PrebidMobile-core-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-core</artifactId>

<version>2.0.0-beta1</version>
<version>2.0.0</version>
<packaging>aar</packaging>
<name>Prebid Mobile Android SDK</name>
<description>Prebid Mobile</description>
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-gamEventHandlers-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-gam-event-handlers</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>

<packaging>jar</packaging>
<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-maxAdapters-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-max-adapters</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>

<packaging>jar</packaging>
<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-core</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 5 additions & 2 deletions scripts/buildPrebidMobile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ for n in ${!modules[@]}; do

# Creating a JAR File

jar cf ${modules[$n]}.jar org* META-INF*

if [ "${modules[$n]}" == "PrebidMobile-maxAdapters" ]; then
jar cf ${modules[$n]}.jar org* com* META-INF*
else
jar cf ${modules[$n]}.jar org* META-INF*
fi

# move jar into a result direcotory
mv ${modules[$n]}.jar $OUTDIR
Expand Down

0 comments on commit d90c622

Please sign in to comment.