Skip to content

Commit

Permalink
Version 8.4 iOS and 8.2 Android
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchvova committed Feb 15, 2021
1 parent b92391d commit 01575cb
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 30 deletions.
Binary file removed plugins/2018.3313/android/chartboost.jar
Binary file not shown.
12 changes: 12 additions & 0 deletions plugins/2018.3313/android/corona.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repositories {
maven { url "https://chartboostmobile.bintray.com/Chartboost" }
}
dependencies {
implementation 'com.chartboost:chartboost-sdk:8.2.0'
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
Binary file modified plugins/2018.3313/android/plugin.chartboost.jar
Binary file not shown.
Binary file modified plugins/2018.3313/iphone-sim/Chartboost.framework/Chartboost
Binary file not shown.
Binary file modified plugins/2018.3313/iphone-sim/libplugin_chartboost.a
Binary file not shown.
Binary file modified plugins/2018.3313/iphone/Chartboost.framework/Chartboost
Binary file not shown.
Binary file modified plugins/2018.3313/iphone/libplugin_chartboost.a
Binary file not shown.
9 changes: 8 additions & 1 deletion src/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ val parsedBuildProperties: JsonObject = run {
}

val coronaMinSdkVersion = parsedBuildProperties.lookup<Any?>("buildSettings.android.minSdkVersion").firstOrNull()?.toString()?.toIntOrNull()
?: 15
?: 16

val coronaBuilder = if (windows) {
"$nativeDir/Corona/win/bin/CoronaBuilder.exe"
Expand Down Expand Up @@ -1087,3 +1087,10 @@ dependencies {
}
implementation("androidx.multidex:multidex:2.0.1")
}

android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
2 changes: 1 addition & 1 deletion src/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ allprojects {
repositories {
google()
jcenter()
// maven(url = "https:// some custom repo")
maven(url = "https://chartboostmobile.bintray.com/Chartboost")
val nativeDir = if (System.getProperty("os.name").toLowerCase().contains("windows")) {
System.getenv("CORONA_ROOT")
} else {
Expand Down
21 changes: 20 additions & 1 deletion src/android/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,29 @@ dependencies {
implementation ':Corona@aar'
}


task extractPluginJar() {
group "Solar2Dev"
dependsOn assemble
doLast {
copy {
from {
zipTree("$buildDir/outputs/aar/${project.name}-release.aar").matching {
include 'classes.jar'
}.singleFile
}
into "$buildDir/outputs/"
String packageName = new XmlSlurper().parse(file('src/main/AndroidManifest.xml')).@package.text()
rename "classes.jar", "${packageName}.jar"
}
}
}


repositories {
maven { url "https://chartboostmobile.bintray.com/Chartboost" }
}
dependencies {
implementation 'com.chartboost:chartboost-sdk:8.0.3'
implementation 'com.chartboost:chartboost-sdk:8.2.0'
}

40 changes: 19 additions & 21 deletions src/android/plugin/src/main/java/plugin/chartboost/LuaLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,42 @@

package plugin.chartboost;

import com.naef.jnlua.LuaState;
import com.naef.jnlua.JavaFunction;
import com.naef.jnlua.LuaType;
import com.naef.jnlua.NamedJavaFunction;
import android.content.Context;
import android.util.Log;

import com.ansca.corona.CoronaLua;
import com.ansca.corona.CoronaLuaEvent;
import com.ansca.corona.CoronaRuntimeTask;
import com.ansca.corona.CoronaRuntimeTaskDispatcher;
import com.ansca.corona.CoronaActivity;
import com.ansca.corona.CoronaEnvironment;
import com.ansca.corona.CoronaLua;
import com.ansca.corona.CoronaLuaEvent;
import com.ansca.corona.CoronaRuntime;
import com.ansca.corona.CoronaRuntimeListener;
import com.ansca.corona.CoronaBeacon;

import android.content.Context;
import android.util.Log;
import com.ansca.corona.CoronaRuntimeTask;
import com.ansca.corona.CoronaRuntimeTaskDispatcher;
import com.chartboost.sdk.CBLocation;
import com.chartboost.sdk.Chartboost;
import com.chartboost.sdk.ChartboostDelegate;
import com.chartboost.sdk.Model.CBError;
import com.naef.jnlua.JavaFunction;
import com.naef.jnlua.LuaState;
import com.naef.jnlua.LuaType;
import com.naef.jnlua.NamedJavaFunction;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

// Chartboost imports
import com.chartboost.sdk.Chartboost;
import com.chartboost.sdk.CBLocation;
import com.chartboost.sdk.ChartboostDelegate;
import com.chartboost.sdk.Model.CBError;

/**
* Implements the Lua interface for the Chartboost plugin.
* <p>
* Only one instance of this class will be created by Corona for the lifetime of the application.
* This instance will be re-used for every new Corona activity that gets created.
*/
@SuppressWarnings("unused")
@SuppressWarnings({"unused", "RedundantSuppression"})
public class LuaLoader implements JavaFunction, CoronaRuntimeListener
{
private static final String PLUGIN_NAME = "plugin.chartboost";
Expand Down Expand Up @@ -545,7 +543,7 @@ public int invoke( LuaState luaState )
return 0;
}

String adType = null;
String adType;
String namedLocation = null;

// Get the ad type
Expand Down Expand Up @@ -640,7 +638,7 @@ public int invoke( LuaState luaState )
return 0;
}

String adType = null;
String adType;
String namedLocation = null;

// Get the ad type
Expand Down Expand Up @@ -765,7 +763,7 @@ public int invoke( LuaState luaState )
return 0;
}

String adType = null;
String adType;
String namedLocation = null;

// Get the ad type
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ typedef NS_ENUM(NSUInteger, CBLevelType) {
productDescription:(NSString *)productDescription
productPrice:(NSDecimalNumber *)productPrice
productCurrency:(NSString *)productCurrency
productIdentifier:(NSString *)productIdentifier;
productIdentifier:(NSString *)productIdentifier
DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version.");

/*!
@abstract
Expand All @@ -90,7 +91,8 @@ typedef NS_ENUM(NSUInteger, CBLevelType) {
productDescription:(NSString *)productDescription
productPrice:(NSDecimalNumber *)productPrice
productCurrency:(NSString *)productCurrency
productIdentifier:(NSString *)productIdentifier;
productIdentifier:(NSString *)productIdentifier
DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version.");
/*!
@abstract
Track an In App Purchase Event.
Expand All @@ -103,7 +105,8 @@ typedef NS_ENUM(NSUInteger, CBLevelType) {
and targeting.
*/
+ (void)trackInAppPurchaseEvent:(NSData *)receipt
product:(SKProduct *)product;
product:(SKProduct *)product
DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version.");


/*!
Expand All @@ -127,7 +130,8 @@ typedef NS_ENUM(NSUInteger, CBLevelType) {
eventField:(CBLevelType)eventField
mainLevel:(NSUInteger)mainLevel
subLevel:(NSUInteger)subLevel
description:(NSString*)description;
description:(NSString*)description
DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version.");

/*!
@abstract
Expand All @@ -147,6 +151,7 @@ typedef NS_ENUM(NSUInteger, CBLevelType) {
+ (void)trackLevelInfo:(NSString*)eventLabel
eventField:(CBLevelType)eventField
mainLevel:(NSUInteger)mainLevel
description:(NSString*)description;
description:(NSString*)description
DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version.");

@end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* CBInPlay.h
* Chartboost
* 8.3.1
* 8.4.0
*
* Copyright 2018 Chartboost. All rights reserved.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ NS_ASSUME_NONNULL_BEGIN
@brief The ad related to the event.
*/
@property (nonatomic, readonly) id<CHBAd> ad;
/*!
@brief A string that uniquely identifies the cached ad, updated when a cache operation ends.
*/
@property (nonatomic, readonly, nullable) NSString *adID;
@end

/*!
Expand Down

0 comments on commit 01575cb

Please sign in to comment.