Skip to content

Commit

Permalink
feat(capacitor): rename AdmobPlus to AdMobPlus
Browse files Browse the repository at this point in the history
  • Loading branch information
ratson committed Feb 15, 2021
1 parent 7f840cb commit a17fec8
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package admob.plus.capacitor;

public class AdMobPlus {

public String start(String value) {
return value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import com.getcapacitor.PluginMethod;
import com.getcapacitor.annotation.CapacitorPlugin;

@CapacitorPlugin(name = "AdmobPlus")
public class AdmobPlusPlugin extends Plugin {
@CapacitorPlugin(name = "AdMobPlus")
public class AdMobPlusPlugin extends Plugin {

private AdmobPlus implementation = new AdmobPlus();
private AdMobPlus implementation = new AdMobPlus();

@PluginMethod
public void start(PluginCall call) {
Expand Down

This file was deleted.

40 changes: 20 additions & 20 deletions packages/capacitor/ios/Plugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
/* Begin PBXBuildFile section */
03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; };
20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; };
2F98D68224C9AAE500613A4C /* AdmobPlus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* AdmobPlus.swift */; };
2F98D68224C9AAE500613A4C /* AdMobPlus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* AdMobPlus.swift */; };
50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; };
50ADFF97201F53D600D50D53 /* AdmobPlusPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* AdmobPlusPluginTests.swift */; };
50ADFF99201F53D600D50D53 /* AdmobPlusPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* AdmobPlusPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
50ADFF97201F53D600D50D53 /* AdMobPlusPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* AdMobPlusPluginTests.swift */; };
50ADFF99201F53D600D50D53 /* AdMobPlusPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* AdMobPlusPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; };
50ADFFA82020EE4F00D50D53 /* AdmobPlusPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* AdmobPlusPlugin.m */; };
50E1A94820377CB70090CE1A /* AdmobPlusPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* AdmobPlusPlugin.swift */; };
50ADFFA82020EE4F00D50D53 /* AdMobPlusPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* AdMobPlusPlugin.m */; };
50E1A94820377CB70090CE1A /* AdMobPlusPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* AdMobPlusPlugin.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -29,17 +29,17 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2F98D68124C9AAE400613A4C /* AdmobPlus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdmobPlus.swift; sourceTree = "<group>"; };
2F98D68124C9AAE400613A4C /* AdMobPlus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdMobPlus.swift; sourceTree = "<group>"; };
3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50ADFF8B201F53D600D50D53 /* AdmobPlusPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdmobPlusPlugin.h; sourceTree = "<group>"; };
50ADFF8B201F53D600D50D53 /* AdMobPlusPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdMobPlusPlugin.h; sourceTree = "<group>"; };
50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
50ADFF96201F53D600D50D53 /* AdmobPlusPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdmobPlusPluginTests.swift; sourceTree = "<group>"; };
50ADFF96201F53D600D50D53 /* AdMobPlusPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdMobPlusPluginTests.swift; sourceTree = "<group>"; };
50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50ADFFA72020EE4F00D50D53 /* AdmobPlusPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AdmobPlusPlugin.m; sourceTree = "<group>"; };
50E1A94720377CB70090CE1A /* AdmobPlusPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdmobPlusPlugin.swift; sourceTree = "<group>"; };
50ADFFA72020EE4F00D50D53 /* AdMobPlusPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AdMobPlusPlugin.m; sourceTree = "<group>"; };
50E1A94720377CB70090CE1A /* AdMobPlusPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdMobPlusPlugin.swift; sourceTree = "<group>"; };
5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = "<group>"; };
91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = "<group>"; };
96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -92,10 +92,10 @@
50ADFF8A201F53D600D50D53 /* Plugin */ = {
isa = PBXGroup;
children = (
50E1A94720377CB70090CE1A /* AdmobPlusPlugin.swift */,
2F98D68124C9AAE400613A4C /* AdmobPlus.swift */,
50ADFF8B201F53D600D50D53 /* AdmobPlusPlugin.h */,
50ADFFA72020EE4F00D50D53 /* AdmobPlusPlugin.m */,
50E1A94720377CB70090CE1A /* AdMobPlusPlugin.swift */,
2F98D68124C9AAE400613A4C /* AdMobPlus.swift */,
50ADFF8B201F53D600D50D53 /* AdMobPlusPlugin.h */,
50ADFFA72020EE4F00D50D53 /* AdMobPlusPlugin.m */,
50ADFF8C201F53D600D50D53 /* Info.plist */,
);
path = Plugin;
Expand All @@ -104,7 +104,7 @@
50ADFF95201F53D600D50D53 /* PluginTests */ = {
isa = PBXGroup;
children = (
50ADFF96201F53D600D50D53 /* AdmobPlusPluginTests.swift */,
50ADFF96201F53D600D50D53 /* AdMobPlusPluginTests.swift */,
50ADFF98201F53D600D50D53 /* Info.plist */,
);
path = PluginTests;
Expand Down Expand Up @@ -138,7 +138,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
50ADFF99201F53D600D50D53 /* AdmobPlusPlugin.h in Headers */,
50ADFF99201F53D600D50D53 /* AdMobPlusPlugin.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -306,17 +306,17 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
50E1A94820377CB70090CE1A /* AdmobPlusPlugin.swift in Sources */,
2F98D68224C9AAE500613A4C /* AdmobPlus.swift in Sources */,
50ADFFA82020EE4F00D50D53 /* AdmobPlusPlugin.m in Sources */,
50E1A94820377CB70090CE1A /* AdMobPlusPlugin.swift in Sources */,
2F98D68224C9AAE500613A4C /* AdMobPlus.swift in Sources */,
50ADFFA82020EE4F00D50D53 /* AdMobPlusPlugin.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
50ADFF8D201F53D600D50D53 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
50ADFF97201F53D600D50D53 /* AdmobPlusPluginTests.swift in Sources */,
50ADFF97201F53D600D50D53 /* AdMobPlusPluginTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
7 changes: 7 additions & 0 deletions packages/capacitor/ios/Plugin/AdMobPlus.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Foundation

@objc public class AdMobPlus: NSObject {
@objc public func start(_ value: String) -> String {
return value
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

// Define the plugin using the CAP_PLUGIN Macro, and
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
CAP_PLUGIN(AdmobPlusPlugin, "AdmobPlus",
CAP_PLUGIN(AdMobPlusPlugin, "AdMobPlus",
CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import Foundation
import Capacitor
import GoogleMobileAds


@objc(AdmobPlusPlugin)
public class AdmobPlusPlugin: CAPPlugin {
private let implementation = AdmobPlus()
@objc(AdMobPlusPlugin)
public class AdMobPlusPlugin: CAPPlugin {
private let implementation = AdMobPlus()

@objc func start(_ call: CAPPluginCall) {
GADMobileAds.sharedInstance().start(completionHandler: { status in
Expand Down
7 changes: 0 additions & 7 deletions packages/capacitor/ios/Plugin/AdmobPlus.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import XCTest
@testable import Plugin

class AdmobPlusTests: XCTestCase {
class AdMobPlusTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
Expand All @@ -16,7 +16,7 @@ class AdmobPlusTests: XCTestCase {
// This is an example of a functional test case for a plugin.
// Use XCTAssert and related functions to verify your tests produce the correct results.

let implementation = AdmobPlus()
let implementation = AdMobPlus()
let value = "Hello, World!"
let result = implementation.echo(value)

Expand Down
6 changes: 1 addition & 5 deletions packages/capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api AdmobPlusPlugin --output-readme README.md --output-json dist/docs.json",
"docgen": "docgen --api AdMobPlusPlugin --output-readme README.md --output-json dist/docs.json",
"build": "yarn clean && yarn docgen && tsc && rollup -c rollup.config.js",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
Expand All @@ -53,12 +53,8 @@
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"eslint": "^7.20.0",
"prettier": "~2.2.1",
"prettier-plugin-java": "~1.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.39.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/capacitor/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
{
file: 'dist/plugin.js',
format: 'iife',
name: 'capacitorAdmobPlus',
name: 'capacitorAdMobPlus',
globals: {
'@capacitor/core': 'capacitorExports',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/capacitor/src/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface AdmobPlusPlugin {
export interface AdMobPlusPlugin {
start(): Promise<void>
}
9 changes: 4 additions & 5 deletions packages/capacitor/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { registerPlugin } from '@capacitor/core'
import type { AdMobPlusPlugin } from './definitions'

import type { AdmobPlusPlugin } from './definitions'

const AdmobPlus = registerPlugin<AdmobPlusPlugin>('AdmobPlus', {
web: () => import('./web').then((m) => new m.AdmobPlusWeb()),
const AdMobPlus = registerPlugin<AdMobPlusPlugin>('AdMobPlus', {
web: () => import('./web').then((m) => new m.AdMobPlusWeb()),
})

export * from './definitions'
export { AdmobPlus }
export { AdMobPlus }
4 changes: 2 additions & 2 deletions packages/capacitor/src/web.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { WebPlugin } from '@capacitor/core'

import type { AdmobPlusPlugin } from './definitions'
import type { AdMobPlusPlugin } from './definitions'

export class AdmobPlusWeb extends WebPlugin implements AdmobPlusPlugin {
export class AdMobPlusWeb extends WebPlugin implements AdMobPlusPlugin {
async start(): Promise<void> {
console.log('start')
}
Expand Down

0 comments on commit a17fec8

Please sign in to comment.