Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ g*.iml
.gradle
.idea
.kotlin
libs

local.properties

Expand Down
6 changes: 5 additions & 1 deletion DemoApp/DemoAppJava/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ android {

dependencies {
// Optable SDK
implementation "com.github.Optable:optable-android-sdk:" + versioning.getVersionName(false)
if (useReleaseSdk == "true") {
implementation "com.github.Optable:optable-android-sdk:" + versioning.getVersionName(false)
} else {
implementation "co.optable:local-sdk"
}

// Google Mobile Ads
implementation 'com.google.android.gms:play-services-ads:24.6.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

MainActivity.OPTABLE = new OptableSDK(this.getApplicationContext(), "sandbox.optable.co", "ios-sdk-demo");
MainActivity.OPTABLE = new OptableSDK("prebidtest", "js-sdk", this);

initUi();
}
Expand Down
3 changes: 2 additions & 1 deletion DemoApp/DemoAppJava/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ org.gradle.jvmargs=-Xmx2048m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=true
useReleaseSdk=false
5 changes: 5 additions & 0 deletions DemoApp/DemoAppJava/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ dependencyResolutionManagement {
}

include ':app'
includeBuild("../..") {
dependencySubstitution {
substitute(module("co.optable:local-sdk")).using(project(":android_sdk"))
}
}
rootProject.name = "DemoJava"
6 changes: 5 additions & 1 deletion DemoApp/DemoAppKotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ android {

dependencies {
// Optable SDK
implementation "com.github.Optable:optable-android-sdk:" + versioning.getVersionName(false)
if (useReleaseSdk == "true") {
implementation "com.github.Optable:optable-android-sdk:" + versioning.getVersionName(false)
} else {
implementation "co.optable:local-sdk"
}

// Google Mobile Ads
implementation 'com.google.android.gms:play-services-ads:24.6.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

OPTABLE = OptableSDK(this, "sandbox.optable.co", "ios-sdk-demo")
OPTABLE = OptableSDK("prebidtest", "js-sdk", this)

initUi()
}

private fun initUi() {
val navView: BottomNavigationView = findViewById(R.id.nav_view)
val navController = findNavController(R.id.nav_host_fragment)
val appBarConfiguration = AppBarConfiguration(setOf(R.id.navigation_identify, R.id.navigation_gambanner))
val appBarConfiguration = AppBarConfiguration(
setOf(
R.id.navigation_identify,
R.id.navigation_gambanner,
)
)
setupActionBarWithNavController(navController, appBarConfiguration)
navView.setupWithNavController(navController)
}
Expand Down
3 changes: 2 additions & 1 deletion DemoApp/DemoAppKotlin/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
useReleaseSdk=false
5 changes: 5 additions & 0 deletions DemoApp/DemoAppKotlin/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ dependencyResolutionManagement {
}

include ':app'
includeBuild("../..") {
dependencySubstitution {
substitute(module("co.optable:local-sdk")).using(project(":android_sdk"))
}
}
rootProject.name = "DemoKotlin"
7 changes: 5 additions & 2 deletions android_sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ plugins {
}

android {
compileSdk 34
compileSdk 35

defaultConfig {
namespace "co.optable"
minSdkVersion 23
targetSdkVersion 34
targetSdkVersion 35

// Here we get version code and version name from latest git release tags:
versionCode versioning.getVersionCode()
Expand Down Expand Up @@ -65,6 +65,9 @@ dependencies {

// Unit tests
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:5.12.0")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
testImplementation("org.robolectric:robolectric:4.16")

// UI tests
Expand Down
Loading