Skip to content

Commit f9bf400

Browse files
committed
Moving the local repo .aar file to .srcaar.
This accomodates Unity adding aars regardless of being in the Editor directory. The jar resolver plugin handles renaming .srcaar to .aar. Also, fixes an issue with metadata tagging files that have no labels. As a result, the 1.0.1 manifest has to be added to remove the old .aar files. Change-Id: I5e038e5731ee8ba33fcbcd34c6641d7e6ede8504
1 parent 81c80d0 commit f9bf400

File tree

5 files changed

+92
-4
lines changed

5 files changed

+92
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
2+
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.1/google-signin-support-1.0.1.aar
3+
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.1/google-signin-support-1.0.1.aar.md5
4+
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.1/google-signin-support-1.0.1.aar.sha1
5+
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.1/google-signin-support-1.0.1.pom
6+
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.1/google-signin-support-1.0.1.pom.md5
7+
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.1/google-signin-support-1.0.1.pom.sha1
8+
Assets/GoogleSignIn/Future.cs
9+
Assets/GoogleSignIn/GoogleSignIn.cs
10+
Assets/GoogleSignIn/GoogleSignInConfiguration.cs
11+
Assets/GoogleSignIn/GoogleSignInStatusCode.cs
12+
Assets/GoogleSignIn/GoogleSignInUser.cs
13+
Assets/GoogleSignIn/Impl/BaseObject.cs
14+
Assets/GoogleSignIn/Impl/GoogleSignInImpl.cs
15+
Assets/GoogleSignIn/Impl/NativeFuture.cs
16+
Assets/GoogleSignIn/Impl/SignInHelperObject.cs
17+
Assets/Parse/LICENSE
18+
Assets/Parse/Plugins/Unity.Compat.dll
19+
Assets/Parse/Plugins/Unity.Tasks.dll
20+
Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.54.0.dll
21+
Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.54.0.dll
22+
Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll
23+
Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.54.0.dll
24+
Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.54.0.txt
25+
Assets/Plugins/Android/native-googlesignin-release.aar
26+
Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.h
27+
Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm

GoogleSignInPlugin/Assets/GoogleSignIn/Editor/google-signin-plugin_v1.0.1.txt.meta

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GoogleSignInPlugin/Assets/SignInSample.meta

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

+12-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ project.ext {
6666
git_exe = 'git'
6767
}
6868

69-
pluginVersion = "1.0.1"
69+
pluginVersion = "1.0.2"
7070
currentPluginBasename = 'google-signin-plugin'
7171
currentPluginName = (currentPluginBasename + '-' + pluginVersion +
7272
'.unitypackage')
@@ -297,14 +297,25 @@ task inject_versionIntoMetaFiles() {
297297
doLast {
298298
for (fileobj in fileTree("${pluginProjectPath}")) {
299299
if (fileobj.path.endsWith('.meta')) {
300+
// Skip the manifest files for any previous versions
301+
if (fileobj.path.contains("Editor/${currentPluginBasename}")) {
302+
continue
303+
}
300304
def lines = fileobj.text.split('\n')
301305
def outputLines = []
306+
def added = false
302307
for (line in lines) {
303308
outputLines.add(line)
304309
if (line.contains('labels:')) {
305310
outputLines.add("- gvh_v${pluginVersion}")
311+
added = true
312+
} else if (line.contains('folderAsset:') && line.contains('yes')) {
313+
added = true
306314
}
307315
}
316+
if (!added) {
317+
outputLines.add("labels:\n- gvh_v${pluginVersion}")
318+
}
308319
fileobj.write(outputLines.join('\n') + '\n')
309320
}
310321
}

native-googlesignin/build.gradle

+41-1
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ if (project.hasProperty("uploadDir")) {
2929
project.ext.uploadDir = "${buildDir}/m2repository"
3030
}
3131

32+
project.ext.baseName = "google-signin-support"
33+
3234
android {
3335
compileSdkVersion 26
3436
buildToolsVersion "25.0.3"
3537
defaultConfig {
3638
minSdkVersion 14
3739
targetSdkVersion 26
3840
versionName project.version
39-
archivesBaseName = 'google-signin-support'
41+
archivesBaseName = project.ext.baseName
4042
externalNativeBuild {
4143
cmake {
4244
cppFlags "-std=c++11", "-Wall"
@@ -59,10 +61,48 @@ android {
5961
}
6062
}
6163

64+
// Rename the .aar file to be .srcaar to work around
65+
// having the local repo in a subdirectory in a Unity project.
66+
// The jar resolver plugin handles the changing back from .srcaar
67+
// to .aar
68+
//
69+
// This is done in 2 parts, first declare the .srcaar as an
70+
// artifact, the second is a task to rename the aar -> srcaar.
71+
72+
artifacts {
73+
archives file("build/${baseName}-${version}.srcaar")
74+
}
75+
76+
task renameLibrary() {
77+
doFirst {
78+
copy {
79+
from "${buildDir}/outputs/aar/${baseName}-release.aar"
80+
into "${buildDir}"
81+
rename {
82+
String fn ->
83+
return fn.replace("release.aar", "${version}.srcaar")
84+
}
85+
}
86+
}
87+
88+
doLast {
89+
configurations.archives.with {
90+
artifacts.remove artifacts.find { it.extension == "aar"}
91+
}
92+
}
93+
}
94+
6295
uploadArchives {
96+
dependsOn renameLibrary
6397
repositories {
6498
mavenDeployer {
6599
repository(url: uri(project.ext.uploadDir))
100+
101+
// Remove the dependencies from the pom file to simplify the
102+
// the resolution process.
103+
pom.whenConfigured {
104+
p -> p.dependencies = []
105+
}
66106
}
67107
}
68108
}

0 commit comments

Comments
 (0)