Skip to content

Commit

Permalink
Version v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jedures committed Nov 26, 2021
1 parent 67cfd7b commit f6fe1e5
Show file tree
Hide file tree
Showing 11 changed files with 232 additions and 21 deletions.
31 changes: 10 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
# Plugin template

To make it work for Solar2D plugins directory add your plugin content into the plugins directory. Then in revision, which is minimum requirement to run the plugin. Repository name must me `com.publisher.name-plugin.name` as it would be in build settings `["plugin.name"] = { publisherId = "com.publisher.name"}`.

For example, `mkdir -p plugins/2020.2600/<platform>a`.


Example platforms are:
* `android-kindle` will use `android` if not found
* `android` any android platform
* `macos` only desktop build
* `mac-sim` desktop build or simulator
* `win32` only desktop build
* `win32-sim` desktop build or simulator
* `web` for html5 builds
* `html5` same as `web`
* `iphone` iOS device
* `iphone-sim` iOS simulator
* `tvos` AppleTV device
* `tvos-sim` Apple TV simulator
* `lua` used if no other applicable platform found
# CAS Solar2d plugin

--
-- Plugins section
--
plugins = {
["plugin.cas"] = {
publisherId = "com.cleveradssolution",
},
},
6 changes: 6 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"contact": "[email protected]",
"url": "https://cleveradssolutions.com",
"pluginName": "plugin.cas",
"publisherId": "com.cleveradssolutions"
}
14 changes: 14 additions & 0 deletions plugins/2020.3569/android/corona.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repositories {
google()
mavenCentral()
maven { url "https://android-sdk.is.com/" } //IronSource
maven { url "https://aa-sdk.s3-eu-west-1.amazonaws.com/android_repo" } //SuperAwesome
maven { url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" } //Mintegral
maven { url "https://artifact.bytedance.com/repository/pangle" } //Pangle
maven { url "https://s3.amazonaws.com/smaato-sdk-releases/" } // Smaato
maven { url "https://sdk.tapjoy.com/" } //TapJoy
}

dependencies {
implementation 'com.cleveradssolutions:cas:2.5.3'
}
24 changes: 24 additions & 0 deletions plugins/2020.3569/android/metadata.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
local metadata =
{
plugin =
{
format = 'jar', -- Valid values are 'jar'
manifest =
{
permissions = {},
usesPermissions =
{
},
usesFeatures = {},
applicationChildElements =
{
},
},
},
coronaManifest = {
dependencies = {
},
},
}

return metadata
Binary file added plugins/2020.3569/android/plugin.cas.jar
Binary file not shown.
22 changes: 22 additions & 0 deletions plugins/2020.3569/iphone-sim/metadata.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local metadata =
{
plugin =
{
format = 'staticLibrary',

-- This is the name without the 'lib' prefix.
-- In this case, the static library is called: libSTATIC_LIB_NAME.a
staticLibs = { 'STATIC_LIB_NAME', },

frameworks = {},
frameworksOptional = {},
},
coronaManifest = {
dependencies = {
-- Example dependencies:
--["plugin.memoryBitmap"] = "com.coronalabs",
},
},
}

return metadata
Empty file.
22 changes: 22 additions & 0 deletions plugins/2020.3569/iphone/metadata.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local metadata =
{
plugin =
{
format = 'staticLibrary',

-- This is the name without the 'lib' prefix.
-- In this case, the static library is called: libSTATIC_LIB_NAME.a
staticLibs = { 'STATIC_LIB_NAME', },

frameworks = {},
frameworksOptional = {},
},
coronaManifest = {
dependencies = {
-- Example dependencies:
--["plugin.memoryBitmap"] = "com.coronalabs",
},
},
}

return metadata
Empty file.
67 changes: 67 additions & 0 deletions plugins/2020.3569/mac-sim/plugin_cas.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
-- Clever Ads Solution plugin

local Library = require "CoronaLibrary"

-- Create library
local lib = Library:new{ name="plugin.cas", publisherId="com.cleveradssolution", version=1 }

-------------------------------------------------------------------------------
-- BEGIN
-------------------------------------------------------------------------------

-- This sample implements the following Lua:
--
-- local cas = require "plugin.cas"
-- cas.init()
--

local function showWarning(functionName)
print( functionName .. " WARNING: The Clever Ads Solution plugin is only supported on Android & iOS devices. Please build for device")
end

function lib.init()
showWarning("cas.init()")
end

function lib.validateIntegration()
showWarning("cas.validateIntegration()")
end

function lib.setDebugMode()
showWarning("cas.init()")
end

function lib.isAdReady()
showWarning("cas.isAdReady()")
end

function lib.setBannerPosition()
showWarning("cas.setBannerPosition()")
end

function lib.setBannerSize()
showWarning("cas.setBannerSize()")
end

function lib.showBanner()
showWarning("cas.showBanner()")
end

function lib.hideBanner()
showWarning("cas.hideBanner()")
end

function lib.showInterstitial()
showWarning("cas.showInterstitial()")
end

function lib.showRewarded()
showWarning("cas.showRewarded()")
end

-------------------------------------------------------------------------------
-- END
-------------------------------------------------------------------------------

-- Return an instance
return lib
67 changes: 67 additions & 0 deletions plugins/2020.3569/win32-sim/plugin_cas.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
-- Clever Ads Solution plugin

local Library = require "CoronaLibrary"

-- Create library
local lib = Library:new{ name="plugin.cas", publisherId="com.cleveradssolution", version=1 }

-------------------------------------------------------------------------------
-- BEGIN
-------------------------------------------------------------------------------

-- This sample implements the following Lua:
--
-- local cas = require "plugin.cas"
-- cas.init()
--

local function showWarning(functionName)
print( functionName .. " WARNING: The Clever Ads Solution plugin is only supported on Android & iOS devices. Please build for device")
end

function lib.init()
showWarning("cas.init()")
end

function lib.validateIntegration()
showWarning("cas.validateIntegration()")
end

function lib.setDebugMode()
showWarning("cas.init()")
end

function lib.isAdReady()
showWarning("cas.isAdReady()")
end

function lib.setBannerPosition()
showWarning("cas.setBannerPosition()")
end

function lib.setBannerSize()
showWarning("cas.setBannerSize()")
end

function lib.showBanner()
showWarning("cas.showBanner()")
end

function lib.hideBanner()
showWarning("cas.hideBanner()")
end

function lib.showInterstitial()
showWarning("cas.showInterstitial()")
end

function lib.showRewarded()
showWarning("cas.showRewarded()")
end

-------------------------------------------------------------------------------
-- END
-------------------------------------------------------------------------------

-- Return an instance
return lib

0 comments on commit f6fe1e5

Please sign in to comment.