-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #598 from adjust/v4383
Version 4.38.3
- Loading branch information
Showing
28 changed files
with
409 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
repositories { | ||
maven { | ||
url "https://oss.sonatype.org/content/repositories/staging/" | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.coreCompileSdkVersion | ||
publishing { | ||
multipleVariants { | ||
allVariants() | ||
withJavadocJar() | ||
} | ||
} | ||
defaultConfig { | ||
minSdkVersion rootProject.ext.samsungCloudDevMinSdkVersion | ||
targetSdkVersion rootProject.ext.coreTargetSdkVersion | ||
} | ||
namespace 'com.adjust.sdk.samsung.clouddev' | ||
} | ||
|
||
dependencies { | ||
// Add SDK via module. | ||
compileOnly project(':sdk-core') | ||
// Add SDK via Maven. | ||
// implementation 'com.adjust.sdk:adjust-android:4.38.3' | ||
|
||
// Add Samsung clouddev lib. | ||
compileOnly fileTree(include: ['*.aar'], dir: 'libs') | ||
} | ||
|
||
// read local properties | ||
File localPropsFile = project.rootProject.file('local.properties') | ||
if (localPropsFile.exists()) { | ||
Properties p = new Properties() | ||
new FileInputStream(localPropsFile).withCloseable { is -> | ||
p.load(is) | ||
} | ||
p.each { name, value -> | ||
ext[name] = value | ||
} | ||
} | ||
|
||
task adjustSamsungCloudDevPluginAar(type: Copy) { | ||
dependsOn 'assembleRelease' | ||
|
||
from('build/outputs/aar/') | ||
include 'sdk-plugin-samsung-clouddev-release.aar' | ||
destinationDir file('build/libs/') | ||
rename 'sdk-plugin-samsung-clouddev-release.aar', "${project.name}.aar" | ||
|
||
} | ||
|
||
task adjustSamsungCloudDevPluginJar(type: Jar) { | ||
dependsOn 'packageReleaseAssets' | ||
dependsOn 'compileReleaseJavaWithJavac' | ||
|
||
from('build/intermediates/library_assets/release/packageReleaseAssets/out/') { | ||
into('assets') | ||
} | ||
from('build/intermediates/javac/release/classes/') | ||
|
||
archiveFileName = project.provider { "${project.name}.jar" } | ||
} | ||
|
||
|
||
task adjustSamsungCloudDevPluginSourcesJar(type: Jar) { | ||
setArchiveClassifier('sources') | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
artifacts { | ||
archives adjustSamsungCloudDevPluginJar | ||
archives adjustSamsungCloudDevPluginSourcesJar | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
/* | ||
mavenAndroidSamsungCloudDevJar(MavenPublication) { | ||
customizePomForJar(pom) | ||
groupId rootProject.ext.adjustGroupId | ||
artifactId 'adjust-android-samsung-clouddev' | ||
version rootProject.ext.coreVersionName | ||
artifact adjustSamsungCloudDevPluginJar | ||
artifact adjustSamsungCloudDevPluginSourcesJar | ||
} | ||
*/ | ||
mavenAndroidSamsungCloudDevAar(MavenPublication) { | ||
customizePomForAar(pom) | ||
groupId rootProject.ext.adjustGroupId | ||
artifactId 'adjust-android-samsung-clouddev' | ||
version rootProject.ext.coreVersionName | ||
|
||
artifact("$buildDir/outputs/aar/sdk-plugin-samsung-clouddev-release.aar") { | ||
builtBy tasks.getByPath("adjustSamsungCloudDevPluginAar") | ||
} | ||
artifact adjustSamsungCloudDevPluginSourcesJar | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
if (project.hasProperty("sonatypeUsername")) { | ||
credentials { | ||
username sonatypeUsername | ||
password sonatypePassword | ||
} | ||
} | ||
} | ||
} | ||
} | ||
signing { | ||
// sign publishing.publications.mavenAndroidSamsungCloudDevJar | ||
sign publishing.publications.mavenAndroidSamsungCloudDevAar | ||
} | ||
} | ||
|
||
def customizePomForJar(pom) { | ||
pom.withXml { | ||
def root = asNode() | ||
|
||
// Add all items necessary for maven central publication. | ||
root.children().last() + { | ||
resolveStrategy = Closure.DELEGATE_FIRST | ||
description 'The Samsung CloudDev plugin for Adjust SDK for Android' | ||
name 'Adjust Android SDK Samsung CloudDev plugin' | ||
url 'https://github.com/adjust/android_sdk' | ||
|
||
organization { | ||
name 'adjust GmbH' | ||
url 'http://www.adjust.com' | ||
} | ||
licenses { | ||
license { | ||
name 'MIT License' | ||
url 'http://www.opensource.org/licenses/mit-license.php' | ||
} | ||
} | ||
scm { | ||
url '[email protected]:adjust/android_sdk.git' | ||
connection 'scm:git:[email protected]:adjust/android_sdk.git' | ||
developerConnection 'scm:git:[email protected]:adjust/android_sdk.git' | ||
} | ||
developers { | ||
developer { | ||
name 'Pedro Silva' | ||
email '[email protected]' | ||
} | ||
developer { | ||
name 'Ugljesa Erceg' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
def customizePomForAar(pom) { | ||
pom.withXml { | ||
def root = asNode() | ||
|
||
// Add all items necessary for maven central publication. | ||
root.children().last() + { | ||
resolveStrategy = Closure.DELEGATE_FIRST | ||
description 'The Samsung CloudDev plugin for Adjust SDK for Android' | ||
name 'Adjust Android SDK Samsung CloudDev plugin' | ||
url 'https://github.com/adjust/android_sdk' | ||
|
||
organization { | ||
name 'adjust GmbH' | ||
url 'http://www.adjust.com' | ||
} | ||
licenses { | ||
license { | ||
name 'MIT License' | ||
url 'http://www.opensource.org/licenses/mit-license.php' | ||
} | ||
} | ||
scm { | ||
url '[email protected]:adjust/android_sdk.git' | ||
connection 'scm:git:[email protected]:adjust/android_sdk.git' | ||
developerConnection 'scm:git:[email protected]:adjust/android_sdk.git' | ||
} | ||
developers { | ||
developer { | ||
name 'Pedro Silva' | ||
email '[email protected]' | ||
} | ||
developer { | ||
name 'Ugljesa Erceg' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
model { | ||
// tasks.generatePomFileForMavenAndroidSamsungCloudDevJarPublication { | ||
// destination = file("${project.buildDir}/generated-pom.xml") | ||
// } | ||
/* TODO check if/how to replace this tasks | ||
tasks.publishMavenAndroidSamsungCloudDevPublicationToMavenLocal { | ||
dependsOn project.tasks.signArchives | ||
} | ||
tasks.publishMavenAndroidSamsungCloudDevPublicationToMavenRepository { | ||
dependsOn project.tasks.signArchives | ||
} | ||
*/ | ||
tasks.generatePomFileForMavenAndroidSamsungCloudDevAarPublication { | ||
destination = file("${project.buildDir}/generated-pom.xml") | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# 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 *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile | ||
|
||
-keepclassmembers, includecode class com.samsung.android.game.cloudgame.dev.sdk.* { *;} |
3 changes: 3 additions & 0 deletions
3
Adjust/sdk-plugin-samsung-clouddev/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-permission android:name="com.google.android.gms.permission.AD_ID" /> | ||
</manifest> |
16 changes: 16 additions & 0 deletions
16
...samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/AdjustSamsungCloudDev.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.adjust.sdk.samsung.clouddev; | ||
|
||
import android.content.Context; | ||
|
||
public class AdjustSamsungCloudDev { | ||
|
||
static boolean shouldUseSamsungCloudDevSdk = true; | ||
|
||
public static void useSamsungCloudDevSdk(Context context) { | ||
shouldUseSamsungCloudDevSdk = true; | ||
} | ||
|
||
public static void doNotUseSamsungCloudDevSdk() { | ||
shouldUseSamsungCloudDevSdk = false; | ||
} | ||
} |
Oops, something went wrong.