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

Commit 7f344a4

Browse files
update java core to version 2.2.10
1 parent f2e15e6 commit 7f344a4

11 files changed

+500
-3
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
[Bb]in/
77
packages/
88
TestResults/
9+
.vscode/
10+
.vs/
11+
tools/
12+
nugets/
913

1014
# globs
1115
Makefile.in
19.5 KB
Binary file not shown.
-19.5 KB
Binary file not shown.

Naxam.Mapbox.MapboxJavaCore/Naxam.Mapbox.MapboxJavaCore.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<TransformFile Include="Transforms\Metadata.xml" />
5454
</ItemGroup>
5555
<ItemGroup>
56-
<EmbeddedJar Include="Jars\mapbox-java-core-2.2.9.jar" />
56+
<EmbeddedJar Include="Jars\mapbox-java-core.jar" />
5757
</ItemGroup>
5858
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
5959
</Project>

Naxam.Mapbox.MapboxJavaCore/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Reflection;
1+
using System.Reflection;
22
using System.Runtime.CompilerServices;
33
using Android.App;
44

@@ -18,7 +18,7 @@
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("2.2.9")]
21+
[assembly: AssemblyVersion("2.2.10")]
2222

2323
// The following attributes are used to specify the signing key for the assembly,
2424
// if desired. See the Mono documentation for more information about signing.

build-all.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PayPal DataCollector
2+
echo "PayPal DataCollector"
3+
cd ./paypal-datacollector
4+
sh ./build.sh
5+
cd ../
6+
cp -p ./paypal-datacollector/*.nupkg ./nugets/
7+
8+
# Braintree Core
9+
echo "Braintree Core"
10+
cd ./braintree-core
11+
sh ./build.sh
12+
cd ../
13+
cp -p ./braintree-core/*.nupkg ./nugets/
14+
15+
# PayPal OneTouch
16+
echo "PayPal OneTouch"
17+
cd ./paypal-onetouch
18+
sh ./build.sh
19+
cd ../
20+
cp -p ./paypal-onetouch/*.nupkg ./nugets/
21+
22+
# PayPal BrainTree
23+
echo "BrainTree"
24+
sh ./build.sh
25+
cp -p ./*.nupkg ./nugets/

build.cake

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
2+
3+
// Cake Addins
4+
#addin nuget:?package=Cake.FileHelpers&version=2.0.0
5+
6+
//////////////////////////////////////////////////////////////////////
7+
// ARGUMENTS
8+
//////////////////////////////////////////////////////////////////////
9+
10+
var target = Argument("target", "Default");
11+
var configuration = Argument("configuration", "Release");
12+
13+
var VERSION = "2.2.10";
14+
var NUGET_SUFIX = "";
15+
16+
//////////////////////////////////////////////////////////////////////
17+
// PREPARATION
18+
//////////////////////////////////////////////////////////////////////
19+
20+
var solutionPath = "./MapboxJavaCore.sln";
21+
var artifacts = new [] {
22+
new Artifact {
23+
AssemblyInfoPath = "./Naxam.Mapbox.MapboxJavaCore/Properties/AssemblyInfo.cs",
24+
NuspecPath = "./mapboxjavacore.nuspec",
25+
DownloadUrl = "http://central.maven.org/maven2/com/mapbox/mapboxsdk/mapbox-java-core/{0}/mapbox-java-core-{0}.jar",
26+
JarPath = "./Naxam.Mapbox.MapboxJavaCore/Jars/mapbox-java-core.jar"
27+
}
28+
};
29+
30+
//////////////////////////////////////////////////////////////////////
31+
// TASKS
32+
//////////////////////////////////////////////////////////////////////
33+
34+
Task("Downloads")
35+
.Does(() =>
36+
{
37+
foreach(var artifact in artifacts) {
38+
var downloadUrl = string.Format(artifact.DownloadUrl, VERSION);
39+
var jarPath = string.Format(artifact.JarPath, VERSION);
40+
41+
DownloadFile(downloadUrl, jarPath);
42+
}
43+
});
44+
45+
Task("Clean")
46+
.Does(() =>
47+
{
48+
CleanDirectory("./packages");
49+
50+
var nugetPackages = GetFiles("./*.nupkg");
51+
52+
foreach (var package in nugetPackages)
53+
{
54+
DeleteFile(package);
55+
}
56+
});
57+
58+
Task("Restore-NuGet-Packages")
59+
.IsDependentOn("Clean")
60+
.Does(() =>
61+
{
62+
NuGetRestore(solutionPath);
63+
});
64+
65+
Task("Build")
66+
.IsDependentOn("Downloads")
67+
.IsDependentOn("Restore-NuGet-Packages")
68+
.Does(() =>
69+
{
70+
MSBuild(solutionPath, settings => settings.SetConfiguration(configuration));
71+
});
72+
73+
Task("UpdateVersion")
74+
.Does(() =>
75+
{
76+
foreach(var artifact in artifacts) {
77+
ReplaceRegexInFiles(artifact.AssemblyInfoPath, "\\[assembly\\: AssemblyVersion([^\\]]+)\\]", string.Format("[assembly: AssemblyVersion(\"{0}\")]", VERSION));
78+
}
79+
});
80+
81+
Task("Pack")
82+
.IsDependentOn("UpdateVersion")
83+
.IsDependentOn("Build")
84+
.Does(() =>
85+
{
86+
foreach(var artifact in artifacts) {
87+
NuGetPack(artifact.NuspecPath, new NuGetPackSettings {
88+
Version = VERSION+NUGET_SUFIX,
89+
// Dependencies = new []{
90+
// new NuSpecDependency {
91+
// Id = "Xamarin.Android.Support.v7.AppCompat",
92+
// Version = "25.4.0"
93+
// },
94+
// new NuSpecDependency {
95+
// Id = "Square.OkHttp3",
96+
// Version = "3.8.1"
97+
// }
98+
// },
99+
ReleaseNotes = new [] {
100+
$"Mapbox-Java-Core SDK - DataCollector v{VERSION}"
101+
}
102+
});
103+
}
104+
});
105+
106+
//////////////////////////////////////////////////////////////////////
107+
// TASK TARGETS
108+
//////////////////////////////////////////////////////////////////////
109+
110+
Task("Default")
111+
.IsDependentOn("Pack");
112+
113+
//////////////////////////////////////////////////////////////////////
114+
// EXECUTION
115+
//////////////////////////////////////////////////////////////////////
116+
117+
RunTarget(target);
118+
119+
class Artifact {
120+
public string AssemblyInfoPath { get; set; }
121+
122+
public string SolutionPath { get; set; }
123+
124+
public string DownloadUrl { get; set; }
125+
126+
public string JarPath { get; set; }
127+
128+
public string NuspecPath { get; set; }
129+
}

0 commit comments

Comments
 (0)