From c5ba00883f4354a97b74e6d27c2ccf49ee97f87d Mon Sep 17 00:00:00 2001 From: Mobile Ads Developer Relations Date: Thu, 14 Nov 2024 17:07:38 -0800 Subject: [PATCH] No public description PiperOrigin-RevId: 696697166 --- Line/CHANGELOG.md | 39 ++++ Line/CHANGELOG.md.meta | 7 + Line/LICENSE | 202 ++++++++++++++++++ Line/LICENSE.meta | 7 + Line/README.md | 9 + Line/README.md.meta | 7 + Line/build.gradle | 121 +++++++++++ Line/build.gradle.meta | 7 + Line/package.json | 21 ++ Line/package.json.meta | 7 + Line/source.meta | 8 + Line/source/android-library/build.gradle | 21 ++ Line/source/android-library/gradle.properties | 21 ++ Line/source/android-library/line/build.gradle | 37 ++++ .../android-library/line/proguard-rules.pgcfg | 22 ++ .../line/src/main/AndroidManifest.xml | 8 + .../line/LineUnityExtrasBuilder.java | 45 ++++ Line/source/android-library/settings.gradle | 3 + Line/source/plugin.meta | 8 + Line/source/plugin/Assets.meta | 8 + .../source/plugin/Assets/GoogleMobileAds.meta | 8 + .../Assets/GoogleMobileAds/Mediation.meta | 8 + .../GoogleMobileAds/Mediation/Line.meta | 8 + .../GoogleMobileAds/Mediation/Line/Api.meta | 8 + .../GoogleMobileAds.Mediation.Line.Api.asmdef | 17 ++ ...leMobileAds.Mediation.Line.Api.asmdef.meta | 7 + .../Mediation/Line/Api/LineMediationExtras.cs | 40 ++++ .../Line/Api/LineMediationExtras.cs.meta | 11 + .../Mediation/Line/Editor.meta | 8 + .../Line/Editor/LineMediationDependencies.xml | 30 +++ .../Editor/LineMediationDependencies.xml.meta | 7 + .../Mediation/Line/Plugins.meta | 8 + .../Mediation/Line/Plugins/Android.meta | 8 + .../Android/GoogleMobileAdsLineMediation.meta | 8 + .../AndroidManifest.xml | 4 + .../AndroidManifest.xml.meta | 7 + .../project.properties | 2 + .../project.properties.meta | 7 + .../Mediation/Line/Plugins/iOS.meta | 8 + .../Line/Plugins/iOS/LineExtrasBuilder.h | 23 ++ .../Line/Plugins/iOS/LineExtrasBuilder.h.meta | 27 +++ .../Line/Plugins/iOS/LineExtrasBuilder.m | 40 ++++ .../Line/Plugins/iOS/LineExtrasBuilder.m.meta | 37 ++++ 43 files changed, 939 insertions(+) create mode 100644 Line/CHANGELOG.md create mode 100644 Line/CHANGELOG.md.meta create mode 100644 Line/LICENSE create mode 100644 Line/LICENSE.meta create mode 100644 Line/README.md create mode 100644 Line/README.md.meta create mode 100644 Line/build.gradle create mode 100644 Line/build.gradle.meta create mode 100644 Line/package.json create mode 100644 Line/package.json.meta create mode 100644 Line/source.meta create mode 100644 Line/source/android-library/build.gradle create mode 100644 Line/source/android-library/gradle.properties create mode 100644 Line/source/android-library/line/build.gradle create mode 100644 Line/source/android-library/line/proguard-rules.pgcfg create mode 100644 Line/source/android-library/line/src/main/AndroidManifest.xml create mode 100644 Line/source/android-library/line/src/main/java/com/google/unity/mediation/line/LineUnityExtrasBuilder.java create mode 100644 Line/source/android-library/settings.gradle create mode 100644 Line/source/plugin.meta create mode 100644 Line/source/plugin/Assets.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h.meta create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m create mode 100644 Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m.meta diff --git a/Line/CHANGELOG.md b/Line/CHANGELOG.md new file mode 100644 index 0000000..08a38ec --- /dev/null +++ b/Line/CHANGELOG.md @@ -0,0 +1,39 @@ +## Line Unity Mediation Plugin Changelog + +#### [Version 1.3.1](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.3.1.zip) +- Supports [Line Android adapter version 2.8.20240808.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-28202408080). +- Supports [Line iOS adapter version 2.8.20240612.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-28202406120). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.2.0. + +#### [Version 1.3.0](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.3.0.zip) +- Supports [Line Android adapter version 2.8.20240722.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-28202407220). +- Supports [Line iOS adapter version 2.8.20240612.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-28202406120). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.2.0. + +#### [Version 1.2.0](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.2.0.zip) +- Supports [Line Android adapter version 2.7.20240515.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-27202405150). +- Supports [Line iOS adapter version 2.8.20240612.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-28202406120). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.1. + +#### [Version 1.1.2](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.1.2.zip) +- Supports [Line Android adapter version 2.7.20240515.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-27202405150). +- Supports [Line iOS adapter version 2.7.20240411.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-27202404110). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0. + +#### [Version 1.1.1](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.1.1.zip) +- Supports [Line Android adapter version 2.7.20240214.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-27202402141). +- Supports [Line iOS adapter version 2.7.20240411.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-27202404110). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0. + +#### [Version 1.1.0](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.1.0.zip) +- Added the `LineMediationExtras` class with the following methods to support passing mediation extras. + * `SetEnabledAdSound(bool)` +- Supports [Line Android adapter version 2.7.20240214.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-27202402141). +- Supports [Line iOS adapter version 2.7.20240318.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-27202403180). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0. + +#### [Version 1.0.0](https://dl.google.com/googleadmobadssdk/mediation/unity/line/LineUnityAdapter-1.0.0.zip) +- Initial Release. +- Supports [Line Android adapter version 2.6.20230607.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-26202306070). +- Supports [Line iOS adapter version 2.6.20230609.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-26202306090). +- Built and tested with the Google Mobile Ads Unity Plugin version 8.5.1. diff --git a/Line/CHANGELOG.md.meta b/Line/CHANGELOG.md.meta new file mode 100644 index 0000000..0ffa1a5 --- /dev/null +++ b/Line/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f761efe2d0dd44e3992a7a4b2473648 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/LICENSE b/Line/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Line/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Line/LICENSE.meta b/Line/LICENSE.meta new file mode 100644 index 0000000..adb597e --- /dev/null +++ b/Line/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 52c4e727f800146758170c0cea70957d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/README.md b/Line/README.md new file mode 100644 index 0000000..e85ec93 --- /dev/null +++ b/Line/README.md @@ -0,0 +1,9 @@ +# Line Adapter plugin for Google Mobile Ads SDK for Unity + +This is a plugin to be used in conjunction with the Google Mobile Ads SDK in +Unity. For requirements, instructions, and other info, see the +[Line Adapter Integration Guide](https://developers.google.com/admob/unity/mediation/line). + +See the +[changelog](https://developers.google.com/admob/unity/mediation/line#line-unity-mediation-plugin-changelog) +to view the version history. diff --git a/Line/README.md.meta b/Line/README.md.meta new file mode 100644 index 0000000..e086dbb --- /dev/null +++ b/Line/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 886738c1a00e84a69a9da6fc90b46b88 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/build.gradle b/Line/build.gradle new file mode 100644 index 0000000..60b347e --- /dev/null +++ b/Line/build.gradle @@ -0,0 +1,121 @@ +/* +* Gradle file to build a Unity package to add Line mediation support to the Google Mobile Ads Unity plugin. +* Usage: ./gradlew exportPackage +*/ +defaultTasks 'exportPackage' + +// Project level variables. +project.ext { + unity_exe = System.getProperty("UNITY_EXE") + if (unity_exe == null || unity_exe.isEmpty()) { + unity_exe = System.getenv("UNITY_EXE") + } + if (unity_exe == null || unity_exe.isEmpty()) { + unity_exe = '/Applications/Unity/Unity.app/Contents/MacOS/Unity' + } + + if (!file(unity_exe).exists()) { + throw new GradleException('Unable to locate installation of Unity. Please create a ' + + 'UNITY_EXE environment variable and point it to your Unity installation.') + } + + versionString = '1.3.2' + adapterName = 'Line' + pluginName = "GoogleMobileAds${adapterName}Mediation" + pluginFileName = "${pluginName}.unitypackage" + zipName = "${adapterName}UnityAdapter-${versionString}" + zipFileName = "${zipName}.zip" + pluginSource = file('source/plugin').absolutePath + pluginBuildDir = file('temp/plugin-build-dir').absolutePath + buildPath = file('temp').absolutePath + exportPath = file(pluginFileName).absolutePath +} + +// Build AAR library from android plugin source files using existing Gradle build file. +task buildAndroidPluginAar(type: GradleBuild) { + buildFile = 'source/android-library/line/build.gradle' + tasks = ['makeAar'] +} + +// Move android plugin AAR library to temporary build directory. +task copyAndroidLibraryAar(type: Copy) { + from('source/android-library/line/build/libs/line-unity-android-library.aar') + into("${pluginBuildDir}/Assets/GoogleMobileAds/Mediation/line/Plugins/Android/") +} + +// Copy Unity mediation extras interface to temporary build directory. +task copyExtrasInterface(type: Copy) { + from("../../source/plugin/Assets/GoogleMobileAds/Api/Mediation/") + into("${pluginBuildDir}/Assets/GoogleMobileAdsApi/Mediation/") + include('MediationExtras.cs') + include('GoogleMobileAds.Api.Mediation.asmdef') +} + +copyAndroidLibraryAar.dependsOn(buildAndroidPluginAar) + +// Build unity package using through command line interface. +// Create new unity project with files in temporary build directory and export files to a unity package. +// Command line usage and arguments documented at http://docs.unity3d.com/Manual/CommandLineArguments.html. +task exportPackage(type: Exec) { + description = "Creates and exports the Plugin unity package" + executable "${unity_exe}" + args "-g.building", + "-batchmode", + "-projectPath", "${pluginBuildDir}", + "-logFile", "temp/unity.log", + "-exportPackage", + "Assets/GoogleMobileAds", + "${exportPath}", + "-quit" + + ignoreExitValue true + + doLast { + if (executionResult.get().exitValue != 0) { + copy { + from "temp/" + into "./" + include "unity.log" + } + } + } +} + +task createTempBuildFolder(type: Copy) { + from { "${pluginSource}" } + into { "${pluginBuildDir}" } +} + +task clearTempBuildFolder(type: Delete) { + delete { "${buildPath}" } +} + +exportPackage.dependsOn(createTempBuildFolder, copyAndroidLibraryAar, copyExtrasInterface) +exportPackage.finalizedBy(clearTempBuildFolder) + +/** + * Delete task to delete any previously generated .zip files by makeZip task. + * makeZip depends on this task. + */ +task clearZip(type: Delete) { + // Targets to be deleted. + delete(zipFileName) +} + +/** + * Zip task to make a zip archive. This task depends on exportPackage and clearZip tasks. + */ +task makeZip(type: Zip) { + // Targets to be added to the zip archive. + from('./' + pluginFileName, './README.md') + from('./' + pluginFileName, './LICENSE') + // Root directory name for the zip archive. + into(zipName) + // Name of the zip archive. + archiveFileName = zipFileName + // Destination directory in which the archive needs to be saved. + destinationDirectory = file('.') +} + +makeZip.dependsOn([clearZip, exportPackage]) +makeZip.mustRunAfter([clearZip, exportPackage]) diff --git a/Line/build.gradle.meta b/Line/build.gradle.meta new file mode 100644 index 0000000..0bd2eb4 --- /dev/null +++ b/Line/build.gradle.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb3302be0dbed4861824b9ffce6dff0e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/package.json b/Line/package.json new file mode 100644 index 0000000..e7ee454 --- /dev/null +++ b/Line/package.json @@ -0,0 +1,21 @@ +{ + "name": "com.google.ads.mobile.mediation.line", + "version": "1.3.2", + "displayName": "Google Mobile Ads Line Mediation", + "keywords": [ + "Google", + "Mobile", + "Ads", + "vh-name:GoogleMobileAdsMediationLine", + "vh-name:Google Mobile Ads Line Mediation" + ], + "author": { + "name": "Google LLC", + "url": "https://github.com/googleads/googleads-mobile-unity-mediation" + }, + "description": "The Google Mobile Ads mediation plugin for Line package allows you to load and display ads from Line using mediation, covering waterfall integrations.", + "unity": "2019.4", + "dependencies": { + "com.google.ads.mobile": "9.0.0" + } +} diff --git a/Line/package.json.meta b/Line/package.json.meta new file mode 100644 index 0000000..6f7d334 --- /dev/null +++ b/Line/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 26972623a3e724af49b5b05d5400ab3e +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source.meta b/Line/source.meta new file mode 100644 index 0000000..827831f --- /dev/null +++ b/Line/source.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 03cf3b78d76b84c098c65edf822a77ed +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/android-library/build.gradle b/Line/source/android-library/build.gradle new file mode 100644 index 0000000..f2399e7 --- /dev/null +++ b/Line/source/android-library/build.gradle @@ -0,0 +1,21 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.4.2' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} diff --git a/Line/source/android-library/gradle.properties b/Line/source/android-library/gradle.properties new file mode 100644 index 0000000..027ef9d --- /dev/null +++ b/Line/source/android-library/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useAndroidX=true +android.enableJetifier=true diff --git a/Line/source/android-library/line/build.gradle b/Line/source/android-library/line/build.gradle new file mode 100644 index 0000000..28534de --- /dev/null +++ b/Line/source/android-library/line/build.gradle @@ -0,0 +1,37 @@ +apply plugin: 'com.android.library' + +android { + namespace 'com.google.unity.mediation.line' + compileSdkVersion 31 + defaultConfig { + minSdkVersion 21 + targetSdkVersion 31 + versionCode 1 + versionName "1.0" + consumerProguardFiles 'proguard-rules.pgcfg' + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pgcfg' + } + } +} + +dependencies { + api project(':app') + api 'com.google.ads.mediation:line:2.8.20240827.0' +} + +task clearAar(type: Delete) { + delete 'build/libs/line-unity-android-library.aar' +} + +task makeAar(type: Copy) { + from('build/outputs/aar/') + into('build/libs/') + include('line-release.aar') + rename('line-release.aar', 'line-unity-android-library.aar') +} + +makeAar.dependsOn(clearAar, build) diff --git a/Line/source/android-library/line/proguard-rules.pgcfg b/Line/source/android-library/line/proguard-rules.pgcfg new file mode 100644 index 0000000..2f6704c --- /dev/null +++ b/Line/source/android-library/line/proguard-rules.pgcfg @@ -0,0 +1,22 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${ANDROID_HOME}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Keep Google Mobile Ads Line Unity mediation plugin classes. +-keep class com.google.unity.mediation.line.** { + *; +} diff --git a/Line/source/android-library/line/src/main/AndroidManifest.xml b/Line/source/android-library/line/src/main/AndroidManifest.xml new file mode 100644 index 0000000..77ab722 --- /dev/null +++ b/Line/source/android-library/line/src/main/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/Line/source/android-library/line/src/main/java/com/google/unity/mediation/line/LineUnityExtrasBuilder.java b/Line/source/android-library/line/src/main/java/com/google/unity/mediation/line/LineUnityExtrasBuilder.java new file mode 100644 index 0000000..c968d0c --- /dev/null +++ b/Line/source/android-library/line/src/main/java/com/google/unity/mediation/line/LineUnityExtrasBuilder.java @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.unity.mediation.line; + +import android.os.Bundle; +import com.google.ads.mediation.line.LineExtras; +import com.google.ads.mediation.line.LineMediationAdapter; +import com.google.unity.ads.AdNetworkExtras; +import java.util.HashMap; + +/** Mediation extras bundle class for the Line adapter. */ +public class LineUnityExtrasBuilder implements AdNetworkExtras { + + /** Key to obtain the "enable ad sound" option. */ + private static final String KEY_ENABLE_AD_SOUND = "enable_ad_sound"; + + @Override + public Bundle buildExtras(HashMap extras) { + LineExtras lineExtras = new LineExtras(); + + String enableAdSound = extras.get(KEY_ENABLE_AD_SOUND); + if (enableAdSound != null) { + lineExtras = new LineExtras(Boolean.parseBoolean(enableAdSound)); + } + + return lineExtras.build(); + } + + @Override + public Class getAdapterClass() { + return LineMediationAdapter.class; + } +} diff --git a/Line/source/android-library/settings.gradle b/Line/source/android-library/settings.gradle new file mode 100644 index 0000000..b730f6d --- /dev/null +++ b/Line/source/android-library/settings.gradle @@ -0,0 +1,3 @@ +include 'line' +include 'app' +project(':app').projectDir = new File('../../../../source/android-library/app') diff --git a/Line/source/plugin.meta b/Line/source/plugin.meta new file mode 100644 index 0000000..448c5e4 --- /dev/null +++ b/Line/source/plugin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77903de6303764042bddebb85c78d7f5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets.meta b/Line/source/plugin/Assets.meta new file mode 100644 index 0000000..ce3e8f5 --- /dev/null +++ b/Line/source/plugin/Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c4a80a9a4f4a347638b3ba54ad239dce +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds.meta b/Line/source/plugin/Assets/GoogleMobileAds.meta new file mode 100644 index 0000000..01cbc37 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 061f6203bf53c47dbada5c72170b1c1b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation.meta new file mode 100644 index 0000000..38976f6 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea25e46e4dbe04325ad6b9f755eb5b89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line.meta new file mode 100644 index 0000000..4eaa20a --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21e5915fc28a64f29843fa173ffb9ea6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api.meta new file mode 100644 index 0000000..ce804db --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9abfa5ec1ceff438b8f66e88783ee64c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef new file mode 100644 index 0000000..cdb3074 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef @@ -0,0 +1,17 @@ +{ + "name": "GoogleMobileAds.Mediation.Line", + "rootNamespace": "", + "references": [ + "GoogleMobileAds.Api.Mediation" + ], + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef.meta new file mode 100644 index 0000000..26fc297 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/GoogleMobileAds.Mediation.Line.Api.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 46ee85e2eccb2404fae6fdb3c9221770 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs new file mode 100644 index 0000000..cdda219 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs @@ -0,0 +1,40 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using GoogleMobileAds.Api.Mediation; + +namespace GoogleMobileAds.Mediation.Line.Api +{ + public class LineMediationExtras : MediationExtras + { + public const string EnableAdSoundKey = "enable_ad_sound"; + + public LineMediationExtras() : base() { } + + public override string AndroidMediationExtraBuilderClassName + { + get { return "com.google.unity.mediation.line.LineUnityExtrasBuilder"; } + } + + public override string IOSMediationExtraBuilderClassName + { + get { return "LineExtrasBuilder"; } + } + + public void SetEnableAdSound(bool enableAdSound) + { + this.Extras.Add(EnableAdSoundKey, enableAdSound.ToString()); + } + } +} diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs.meta new file mode 100644 index 0000000..916b303 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Api/LineMediationExtras.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30d2d72f3728a4f3fb5f8691514dd96a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor.meta new file mode 100644 index 0000000..069385a --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9144e24b8237f4146bc2b6e1c7eb23dc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml new file mode 100644 index 0000000..827fe38 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml @@ -0,0 +1,30 @@ + + + + + + + https://repo.maven.apache.org/maven2/ + https://dl.google.com/dl/android/maven2/ + + + + + + + + diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml.meta new file mode 100644 index 0000000..76a1a1d --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Editor/LineMediationDependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bbf1e8ffb465a454ab42268f06ec45f0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins.meta new file mode 100644 index 0000000..4d8c192 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2ede79bc96d142098c13b84e1201893 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android.meta new file mode 100644 index 0000000..db3c486 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dfa8b76a2af0b4f74aac1299aee9b643 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation.meta new file mode 100644 index 0000000..732c4f6 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc4a0b9e3d5974dd5a0cb4b658c5fabd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml new file mode 100644 index 0000000..9bc60f7 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml.meta new file mode 100644 index 0000000..e6d59f2 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/AndroidManifest.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 98ecf1e855d5848598f707e38b7de9e2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties new file mode 100644 index 0000000..daf5284 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties @@ -0,0 +1,2 @@ +target=android-31 +android.library=true \ No newline at end of file diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties.meta new file mode 100644 index 0000000..12656e4 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/Android/GoogleMobileAdsLineMediation/project.properties.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 014d807ca2c9b49bfb17fe1b5d165c9b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS.meta new file mode 100644 index 0000000..11e075a --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 75c1a842ff30c4826a96fe357fcd3ae2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h new file mode 100644 index 0000000..1d2ad7b --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h @@ -0,0 +1,23 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +#import + +#import "GADUAdNetworkExtras.h" + +@interface LineExtrasBuilder : NSObject + +@end diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h.meta new file mode 100644 index 0000000..0d2cfca --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.h.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 8fbbff91c2b9d4724bfed0304212f9c1 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m new file mode 100644 index 0000000..c931406 --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m @@ -0,0 +1,40 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "LineExtrasBuilder.h" + +#import + +@implementation LineExtrasBuilder + +NSString *const EnableAdSoundKey = @"enable_ad_sound"; + +- (id)adNetworkExtrasWithDictionary: + (NSDictionary *)extras { + GADMediationAdapterLineExtras *lineExtras = [[GADMediationAdapterLineExtras alloc] init]; + + NSString *enableAdSound = extras[EnableAdSoundKey]; + lineExtras.adAudio = GADMediationAdapterLineAdAudioUnset; + if (!enableAdSound) { + return lineExtras; + } + if (enableAdSound.boolValue) { + lineExtras.adAudio = GADMediationAdapterLineAdAudioUnmuted; + } else { + lineExtras.adAudio = GADMediationAdapterLineAdAudioMuted; + } + return lineExtras; +} + +@end diff --git a/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m.meta b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m.meta new file mode 100644 index 0000000..8f6d3cc --- /dev/null +++ b/Line/source/plugin/Assets/GoogleMobileAds/Mediation/Line/Plugins/iOS/LineExtrasBuilder.m.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: 2c59ddbaf04f1418b99e1a95f1245d95 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: