Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit e46f78a

Browse files
committed
constraint-layout switch jar embedding
1 parent 1c5a355 commit e46f78a

File tree

5 files changed

+17
-82
lines changed

5 files changed

+17
-82
lines changed

constraint-layout-solver/source/ConstraintLayoutSolver.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@
5252
</ItemGroup>
5353
<ItemGroup>
5454
<Folder Include="Additions\" />
55+
<Folder Include="Jars\" />
5556
</ItemGroup>
5657
<ItemGroup>
57-
<InputJar Include="..\..\externals\solver\constraint-layout-solver-1.0.2.jar">
58-
<Link>Jars\constraint-layout-solver.jar</Link>
59-
</InputJar>
58+
<EmbeddedJar Include="..\..\externals\constraint-layout-solver.jar">
59+
<Link>constraint-layout-solver.jar</Link>
60+
</EmbeddedJar>
6061
</ItemGroup>
6162
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
6263
</Project>

constraint-layout-solver/source/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,4 @@
1818
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1919
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
2020

21-
[assembly: AssemblyVersion ("1.0.0")]
22-
23-
// The following attributes are used to specify the signing key for the assembly,
24-
// if desired. See the Mono documentation for more information about signing.
25-
26-
//[assembly: AssemblyDelaySign(false)]
27-
//[assembly: AssemblyKeyFile("")]
28-
29-
[assembly: Java.Interop.JavaLibraryReference (__Consts.JarPath,
30-
PackageName = __Consts.PackageName,
31-
SourceUrl = __Consts.Url,
32-
//EmbeddedArchive = __Consts.JarPath,
33-
Version = __Consts.Version,
34-
Sha1sum = __Consts.Sha1sum)]
35-
36-
//[assembly: Android.IncludeAndroidResourcesFromAttribute ("./",
37-
// PackageName = __Consts.PackageName,
38-
// SourceUrl = __Consts.Url,
39-
// EmbeddedArchive = __Consts.AarPath,
40-
// Version = __Consts.Version,
41-
// Sha1sum = __Consts.Sha1sum)]
42-
43-
static class __Consts
44-
{
45-
public const string JarPath = "solver/constraint-layout-solver-" + JarVersion + ".jar";
46-
public const string JarVersion = "1.0.0-alpha9";
47-
public const string Version = JarVersion;
48-
public const string PackageName = "Xamarin.Android.Support.Constraint.Layout.Solver";
49-
public const string Url = "https://dl-ssl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-" + JarVersion + ".zip";
50-
public const string Sha1sum = "2c52ddd883d83230a17042b8f4ba03669f0f5f40";
51-
}
21+
[assembly: AssemblyVersion ("1.1.0.0")]

constraint-layout/build.cake

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
var TARGET = Argument ("target", Argument ("t", "Default"));
77

88

9-
var NUGET_VERSION = "1.0.2";
9+
var NUGET_VERSION = "1.0.2.2";
1010
var AAR_VERSION = "1.0.2";
1111

12-
var CONSTRAINT_LAYOUT_URL = string.Format ("https://dl-ssl.google.com/android/repository/com.android.support.constraint-constraint-layout-{0}.zip", AAR_VERSION);
13-
var CONSTRAINT_LAYOUT_SOLVER_URL = string.Format ("https://dl-ssl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-{0}.zip", AAR_VERSION);
12+
var CONSTRAINT_LAYOUT_URL = string.Format ("https://dl.google.com/dl/android/maven2/com/android/support/constraint/constraint-layout/{0}/constraint-layout-{0}.aar", AAR_VERSION);
13+
var CONSTRAINT_LAYOUT_SOLVER_URL = string.Format ("https://dl.google.com/dl/android/maven2/com/android/support/constraint/constraint-layout-solver/{0}/constraint-layout-solver-{0}.jar", AAR_VERSION);
1414

1515

1616
var buildSpec = new BuildSpec {
@@ -43,17 +43,10 @@ Task ("externals")
4343

4444
EnsureDirectoryExists (path);
4545

46-
// Get the actual .aar files and extract
47-
if (!FileExists (path + "constraintlayout.zip"))
48-
DownloadFile (CONSTRAINT_LAYOUT_URL, path + "constraintlayout.zip");
49-
if (!FileExists (path + "constraintlayout/source.properties"))
50-
Unzip(path + "constraintlayout.zip", path);
51-
Unzip (path + "constraintlayout/constraint-layout-" + AAR_VERSION + ".aar", path + "constraintlayout/");
52-
53-
if (!FileExists (path + "constraintlayoutsolver.zip"))
54-
DownloadFile (CONSTRAINT_LAYOUT_SOLVER_URL, path + "constraintlayoutsolver.zip");
55-
if (!FileExists (path + "solver/source.properties"))
56-
Unzip(path + "constraintlayoutsolver.zip", path);
46+
if (!FileExists (path + "constraint-layout.aar"))
47+
DownloadFile (CONSTRAINT_LAYOUT_URL, path + "constraint-layout.aar");
48+
if (!FileExists (path + "constraint-layout-solver.jar"))
49+
DownloadFile (CONSTRAINT_LAYOUT_SOLVER_URL, path + "constraint-layout-solver.jar");
5750
});
5851

5952
Task ("clean").IsDependentOn ("clean-base").Does (() =>

constraint-layout/source/ConstraintLayout.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
</ItemGroup>
5353
<ItemGroup>
5454
<Folder Include="Additions\" />
55+
<Folder Include="Jars\" />
5556
</ItemGroup>
5657
<ItemGroup>
5758
<ProjectReference Include="..\..\constraint-layout-solver\source\ConstraintLayoutSolver.csproj">
@@ -60,9 +61,9 @@
6061
</ProjectReference>
6162
</ItemGroup>
6263
<ItemGroup>
63-
<InputJar Include="..\..\externals\constraintlayout\classes.jar">
64-
<Link>Jars\constraint-layout-aar.jar</Link>
65-
</InputJar>
64+
<LibraryProjectZip Include="..\..\externals\constraint-layout.aar">
65+
<Link>constraint-layout.aar</Link>
66+
</LibraryProjectZip>
6667
</ItemGroup>
6768
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
6869
</Project>

constraint-layout/source/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,4 @@
1818
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1919
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
2020

21-
[assembly: AssemblyVersion ("1.0.0")]
22-
23-
// The following attributes are used to specify the signing key for the assembly,
24-
// if desired. See the Mono documentation for more information about signing.
25-
26-
//[assembly: AssemblyDelaySign(false)]
27-
//[assembly: AssemblyKeyFile("")]
28-
29-
[assembly: Java.Interop.JavaLibraryReference ("classes.jar",
30-
PackageName = __Consts.PackageName,
31-
SourceUrl = __Consts.Url,
32-
EmbeddedArchive = __Consts.AarPath,
33-
Version = __Consts.Version,
34-
Sha1sum = __Consts.Sha1sum)]
35-
36-
[assembly: Android.IncludeAndroidResourcesFromAttribute ("./",
37-
PackageName = __Consts.PackageName,
38-
SourceUrl = __Consts.Url,
39-
EmbeddedArchive = __Consts.AarPath,
40-
Version = __Consts.Version,
41-
Sha1sum = __Consts.Sha1sum)]
42-
43-
static class __Consts
44-
{
45-
public const string AarVersion = "1.0.0-alpha9";
46-
public const string Version = AarVersion;
47-
public const string PackageName = "Xamarin.Android.Support.Constraint.Layout";
48-
public const string Url = "https://dl-ssl.google.com/android/repository/com.android.support.constraint-constraint-layout-" + __Consts.AarVersion + ".zip";
49-
public const string AarPath = "constraintlayout/constraint-layout-" + __Consts.AarVersion + ".aar";
50-
public const string Sha1sum = "89c2bbc005d4731c7a830a4d5aa98dae121a46a4";
51-
}
21+
[assembly: AssemblyVersion ("1.1.0.0")]

0 commit comments

Comments
 (0)