Skip to content

Commit e765ad9

Browse files
authored
Merge pull request #647 from adjust/v544
Version 5.4.4
2 parents 63579fb + 3bd5d9b commit e765ad9

File tree

52 files changed

+1146
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1146
-32
lines changed

Adjust/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ext {
99
coreMinSdkVersion = 21
1010
coreCompileSdkVersion = 36
1111
coreTargetSdkVersion = 36
12-
coreVersionName = '5.4.3'
12+
coreVersionName = '5.4.4'
1313
defaultVersionCode = 1
1414
webbridgeMinSdkVersion = 21
1515
samsungReferrerMinSdkVersion = 21
@@ -21,14 +21,17 @@ ext {
2121
}
2222

2323
buildscript {
24+
ext {
25+
agp_version = '8.10.1'
26+
}
2427
ext.kotlin_version = '2.1.0'
2528

2629
repositories {
2730
mavenCentral()
2831
google()
2932
}
3033
dependencies {
31-
classpath 'com.android.tools.build:gradle:8.10.1'
34+
classpath "com.android.tools.build:gradle:$agp_version"
3235

3336
// NOTE: Do not place your application dependencies here; they belong
3437
// in the individual module build.gradle files.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Copyright (c) 2012-Present Adjust GmbH, http://www.adjust.com
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+
-----------------------------------
23+
Third-Party Components and Licenses
24+
-----------------------------------
25+
26+
This project includes code from the following third-party component(s):
27+
28+
- Google Licensing Service
29+
Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
30+
31+
The Apache 2.0 license and any required NOTICE file are located in src/main/aidl/com/android/vending/licensing directory
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'maven-publish'
3+
apply plugin: 'signing'
4+
5+
repositories {
6+
maven {
7+
url "https://oss.sonatype.org/content/repositories/staging/"
8+
}
9+
}
10+
11+
android {
12+
compileSdk rootProject.ext.coreCompileSdkVersion
13+
publishing {
14+
multipleVariants {
15+
allVariants()
16+
withJavadocJar()
17+
}
18+
}
19+
defaultConfig {
20+
minSdkVersion rootProject.ext.coreMinSdkVersion
21+
targetSdkVersion rootProject.ext.coreTargetSdkVersion
22+
}
23+
namespace 'com.adjust.sdk.google.lvl'
24+
sourceSets {
25+
main {
26+
aidl {
27+
srcDirs 'src/main/aidl'
28+
}
29+
}
30+
}
31+
buildFeatures {
32+
aidl true
33+
}
34+
testOptions {
35+
unitTests.includeAndroidResources = true
36+
}
37+
}
38+
39+
dependencies {
40+
41+
// Add SDK via module.
42+
compileOnly project(':sdk-core')
43+
// Unit testing
44+
// For unit tests
45+
testImplementation 'junit:junit:4.13.2'
46+
testImplementation 'org.mockito:mockito-core:5.10.0'
47+
48+
// For integration tests
49+
testImplementation 'org.robolectric:robolectric:4.11.1'
50+
51+
// Add SDK via Maven.
52+
// implementation 'com.adjust.sdk:adjust-android:5.3.0'
53+
}
54+
55+
// read local properties
56+
File localPropsFile = project.rootProject.file('local.properties')
57+
if (localPropsFile.exists()) {
58+
Properties p = new Properties()
59+
new FileInputStream(localPropsFile).withCloseable { is ->
60+
p.load(is)
61+
}
62+
p.each { name, value ->
63+
ext[name] = value
64+
}
65+
}
66+
67+
task adjustLvlPluginAar(type: Copy) {
68+
dependsOn 'assembleRelease'
69+
70+
from('build/outputs/aar/')
71+
include 'sdk-plugin-google-lvl-release.aar'
72+
destinationDir file('build/libs/')
73+
rename 'sdk-plugin-google-lvl-release.aar', "${project.name}.aar"
74+
75+
}
76+
77+
task adjustLvlPluginJar(type: Jar) {
78+
dependsOn 'packageReleaseAssets'
79+
dependsOn 'compileReleaseJavaWithJavac'
80+
81+
from('build/intermediates/library_assets/release/packageReleaseAssets/out/') {
82+
into('assets')
83+
}
84+
from('build/intermediates/javac/release/classes/')
85+
86+
archiveFileName = project.provider { "${project.name}.jar" }
87+
}
88+
89+
90+
task adjustLvlPluginSourcesJar(type: Jar) {
91+
setArchiveClassifier('sources')
92+
from android.sourceSets.main.java.srcDirs
93+
}
94+
95+
artifacts {
96+
archives adjustLvlPluginJar
97+
archives adjustLvlPluginSourcesJar
98+
}
99+
100+
afterEvaluate {
101+
publishing {
102+
publications {
103+
/*
104+
mavenAndroidLvlJar(MavenPublication) {
105+
customizePomForJar(pom)
106+
groupId rootProject.ext.adjustGroupId
107+
artifactId 'adjust-android-license-verification'
108+
version rootProject.ext.coreVersionName
109+
110+
artifact adjustLvlPluginJar
111+
artifact adjustLvlPluginSourcesJar
112+
}
113+
*/
114+
mavenAndroidLvlAar(MavenPublication) {
115+
customizePomForAar(pom)
116+
groupId rootProject.ext.adjustGroupId
117+
artifactId 'adjust-android-google-lvl'
118+
version rootProject.ext.coreVersionName
119+
120+
artifact("$buildDir/outputs/aar/sdk-plugin-google-lvl-release.aar") {
121+
builtBy tasks.getByPath("adjustLvlPluginAar")
122+
}
123+
artifact adjustLvlPluginSourcesJar
124+
}
125+
}
126+
127+
repositories {
128+
maven {
129+
if (rootProject.ext.coreVersionName.toString().contains('SNAPSHOT')) {
130+
println "Using Maven SNAPSHOT repository for publishing"
131+
url "https://oss.sonatype.org/content/repositories/snapshots/"
132+
} else {
133+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
134+
}
135+
if (project.hasProperty("sonatypeUsername")) {
136+
credentials {
137+
username sonatypeUsername
138+
password sonatypePassword
139+
}
140+
}
141+
}
142+
}
143+
}
144+
signing {
145+
// sign publishing.publications.mavenAndroidLvlJar
146+
sign publishing.publications.mavenAndroidLvlAar
147+
}
148+
}
149+
150+
def customizePomForJar(pom) {
151+
pom.withXml {
152+
def root = asNode()
153+
154+
// Add all items necessary for maven central publication.
155+
root.children().last() + {
156+
resolveStrategy = Closure.DELEGATE_FIRST
157+
description 'The License Verification plugin for Adjust SDK for Android'
158+
name 'Adjust Android SDK License Verification plugin'
159+
url 'https://github.com/adjust/android_sdk'
160+
161+
organization {
162+
name 'Adjust GmbH'
163+
url 'http://www.adjust.com'
164+
}
165+
licenses {
166+
license {
167+
name 'MIT License'
168+
url 'http://www.opensource.org/licenses/mit-license.php'
169+
}
170+
}
171+
scm {
172+
url '[email protected]:adjust/android_sdk.git'
173+
connection 'scm:git:[email protected]:adjust/android_sdk.git'
174+
developerConnection 'scm:git:[email protected]:adjust/android_sdk.git'
175+
}
176+
developers {
177+
developer {
178+
name 'Pedro Silva'
179+
180+
}
181+
developer {
182+
name 'Ugljesa Erceg'
183+
184+
}
185+
}
186+
}
187+
}
188+
}
189+
190+
def customizePomForAar(pom) {
191+
pom.withXml {
192+
def root = asNode()
193+
194+
// Add all items necessary for maven central publication.
195+
root.children().last() + {
196+
resolveStrategy = Closure.DELEGATE_FIRST
197+
description 'The License Verification plugin for Adjust SDK for Android'
198+
name 'Adjust Android SDK License Verification plugin'
199+
url 'https://github.com/adjust/android_sdk'
200+
201+
organization {
202+
name 'Adjust GmbH'
203+
url 'http://www.adjust.com'
204+
}
205+
licenses {
206+
license {
207+
name 'MIT License'
208+
url 'http://www.opensource.org/licenses/mit-license.php'
209+
}
210+
}
211+
scm {
212+
url '[email protected]:adjust/android_sdk.git'
213+
connection 'scm:git:[email protected]:adjust/android_sdk.git'
214+
developerConnection 'scm:git:[email protected]:adjust/android_sdk.git'
215+
}
216+
developers {
217+
developer {
218+
name 'Pedro Silva'
219+
220+
}
221+
developer {
222+
name 'Ugljesa Erceg'
223+
224+
}
225+
}
226+
}
227+
}
228+
}
229+
230+
model {
231+
// tasks.generatePomFileForMavenAndroidLvlJarPublication {
232+
// destination = file("${project.buildDir}/generated-pom.xml")
233+
// }
234+
/* TODO check if/how to replace this tasks
235+
tasks.publishMavenAndroidLvlPublicationToMavenLocal {
236+
dependsOn project.tasks.signArchives
237+
}
238+
tasks.publishMavenAndroidLvlPublicationToMavenRepository {
239+
dependsOn project.tasks.signArchives
240+
}
241+
*/
242+
tasks.generatePomFileForMavenAndroidLvlAarPublication {
243+
destination = file("${project.buildDir}/generated-pom.xml")
244+
}
245+
}
246+
247+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
23+
# Keep all classes in the LVL licensing AIDL package
24+
-keep class com.android.vending.licensing.** { *; }
25+
26+
# Keep interface method signatures
27+
-keep interface com.android.vending.licensing.ILicensingService
28+
-keep interface com.android.vending.licensing.ILicenseResultListener
29+
30+
# Prevent obfuscation of the stub classes used for IPC
31+
-keepclassmembers class * implements android.os.IInterface {
32+
<methods>;
33+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:versionCode="2"
4+
android:versionName="1.5">
5+
<!-- Required permission to check licensing. -->
6+
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
7+
</manifest>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (C) 2010 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.vending.licensing;
18+
19+
oneway interface ILicenseResultListener {
20+
void verifyLicense(int responseCode, String signedData, String signature);
21+
}

0 commit comments

Comments
 (0)