Skip to content

Commit 3632d9a

Browse files
committed
Added Uno Directory.Build.props
1 parent b39aa77 commit 3632d9a

File tree

135 files changed

+3677
-0
lines changed

Some content is hidden

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

135 files changed

+3677
-0
lines changed

UnoDirectoryBuildProps/.vsconfig

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"version": "1.0",
3+
"components": [
4+
"Microsoft.VisualStudio.Component.CoreEditor",
5+
"Microsoft.VisualStudio.Workload.CoreEditor",
6+
"Microsoft.NetCore.Component.Runtime.3.1",
7+
"Microsoft.NetCore.Component.SDK",
8+
"Microsoft.VisualStudio.Component.NuGet",
9+
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
10+
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
11+
"Microsoft.NetCore.Component.DevelopmentTools",
12+
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
13+
"Microsoft.VisualStudio.Component.DockerTools",
14+
"Microsoft.NetCore.Component.Web",
15+
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
16+
"Microsoft.VisualStudio.Component.TypeScript.4.0",
17+
"Microsoft.VisualStudio.Component.JavaScript.TypeScript",
18+
"Microsoft.VisualStudio.Component.JavaScript.Diagnostics",
19+
"Microsoft.Component.MSBuild",
20+
"Microsoft.VisualStudio.Component.TextTemplating",
21+
"Component.Microsoft.VisualStudio.RazorExtension",
22+
"Microsoft.VisualStudio.Component.IISExpress",
23+
"Microsoft.VisualStudio.Component.SQL.ADAL",
24+
"Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
25+
"Microsoft.VisualStudio.Component.Common.Azure.Tools",
26+
"Microsoft.VisualStudio.Component.SQL.CLR",
27+
"Microsoft.VisualStudio.Component.MSODBC.SQL",
28+
"Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils",
29+
"Microsoft.VisualStudio.Component.ManagedDesktop.Core",
30+
"Microsoft.VisualStudio.Component.SQL.SSDT",
31+
"Microsoft.VisualStudio.Component.SQL.DataSources",
32+
"Component.Microsoft.Web.LibraryManager",
33+
"Microsoft.VisualStudio.ComponentGroup.Web",
34+
"Microsoft.VisualStudio.Component.Web",
35+
"Microsoft.VisualStudio.Component.IntelliCode",
36+
"Component.Microsoft.VisualStudio.LiveShare",
37+
"Microsoft.VisualStudio.ComponentGroup.Web.Client",
38+
"Microsoft.Net.ComponentGroup.TargetingPacks.Common",
39+
"Component.Microsoft.VisualStudio.Web.AzureFunctions",
40+
"Microsoft.VisualStudio.ComponentGroup.AzureFunctions",
41+
"Microsoft.VisualStudio.Component.Azure.Compute.Emulator",
42+
"Microsoft.VisualStudio.Component.Azure.Storage.Emulator",
43+
"Microsoft.VisualStudio.Component.Azure.ClientLibs",
44+
"Microsoft.VisualStudio.Component.Azure.AuthoringTools",
45+
"Microsoft.VisualStudio.Component.CloudExplorer",
46+
"Microsoft.VisualStudio.ComponentGroup.Web.CloudTools",
47+
"Microsoft.VisualStudio.Component.DiagnosticTools",
48+
"Microsoft.VisualStudio.Component.EntityFramework",
49+
"Microsoft.VisualStudio.Component.AspNet45",
50+
"Microsoft.VisualStudio.Component.AppInsights.Tools",
51+
"Microsoft.VisualStudio.Component.WebDeploy",
52+
"Microsoft.VisualStudio.Workload.NetWeb",
53+
"Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites",
54+
"Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools",
55+
"Microsoft.VisualStudio.Component.Azure.Waverton",
56+
"Microsoft.Component.Azure.DataLake.Tools",
57+
"Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools",
58+
"Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools",
59+
"Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools",
60+
"Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices",
61+
"Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools",
62+
"Microsoft.VisualStudio.Workload.Azure",
63+
"Microsoft.VisualStudio.Component.VC.CoreIde",
64+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
65+
"Microsoft.VisualStudio.Component.Graphics.Tools",
66+
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
67+
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
68+
"Microsoft.ComponentGroup.Blend",
69+
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
70+
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
71+
"Microsoft.VisualStudio.Workload.ManagedDesktop",
72+
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
73+
"Microsoft.Component.NetFX.Native",
74+
"Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard",
75+
"Microsoft.VisualStudio.Component.Graphics",
76+
"Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin",
77+
"Microsoft.VisualStudio.ComponentGroup.UWP.Support",
78+
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
79+
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
80+
"Microsoft.VisualStudio.Component.VC.Tools.ARM",
81+
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
82+
"Microsoft.VisualStudio.Workload.Universal",
83+
"Component.OpenJDK",
84+
"Microsoft.VisualStudio.Component.MonoDebugger",
85+
"Microsoft.VisualStudio.Component.Merq",
86+
"Component.Xamarin.RemotedSimulator",
87+
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine",
88+
"Component.Xamarin",
89+
"Component.Android.SDK28",
90+
"Microsoft.VisualStudio.Workload.NetCrossPlat",
91+
"Microsoft.VisualStudio.Workload.NetCoreTools",
92+
"Microsoft.VisualStudio.ComponentGroup.Maui.All",
93+
]
94+
}

UnoDirectoryBuildProps/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Central nuget store for your UNO Platform App
2+
3+
With the newest UNO Platform update to .NET 6 we can leverage some cool things to simplify our dependency management.
4+
We combine .NET 6 with the new feature called **Directory.Build.props** to make that work.
5+
6+
Found [here](https://steven-giesel.com/blogPost/be9722bb-3077-401f-b88d-7393e7afe880)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"solution": {
3+
"path": "UnoDirectoryBuildProps.sln",
4+
"projects": [
5+
"UnoDirectoryBuildProps.Shared\\UnoDirectoryBuildProps.Shared.shproj",
6+
7+
8+
"UnoDirectoryBuildProps.Wasm\\UnoDirectoryBuildProps.Wasm.csproj",
9+
10+
"UnoDirectoryBuildProps.Skia.Gtk\\UnoDirectoryBuildProps.Skia.Gtk.csproj",
11+
]
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="UnoDirectoryBuildProps" android:versionCode="1" android:versionName="1.0">
3+
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="31" />
4+
<application android:label="UnoDirectoryBuildProps"></application>
5+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
To add cross-platform image assets for your Uno Platform app, use the Assets folder
2+
in the shared project instead. Assets in this folder are Android-only assets.
3+
4+
Any raw assets you want to be deployed with your application can be placed in
5+
this directory (and child directories) and given a Build Action of "AndroidAsset".
6+
7+
These files will be deployed with you package and will be accessible using Android's
8+
AssetManager, like this:
9+
10+
public class ReadAsset : Activity
11+
{
12+
protected override void OnCreate (Bundle bundle)
13+
{
14+
base.OnCreate (bundle);
15+
16+
InputStream input = Assets.Open ("my_asset.txt");
17+
}
18+
}
19+
20+
Additionally, some Android functions will automatically load asset files:
21+
22+
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using Android.App;
6+
using Android.Content;
7+
using Android.OS;
8+
using Android.Runtime;
9+
using Android.Views;
10+
using Android.Widget;
11+
using Com.Nostra13.Universalimageloader.Core;
12+
using Microsoft.UI.Xaml.Media;
13+
14+
namespace UnoDirectoryBuildProps.Droid
15+
{
16+
[global::Android.App.ApplicationAttribute(
17+
Label = "@string/ApplicationName",
18+
Icon = "@mipmap/icon",
19+
LargeHeap = true,
20+
HardwareAccelerated = true,
21+
Theme = "@style/AppTheme"
22+
)]
23+
public class Application : Microsoft.UI.Xaml.NativeApplication
24+
{
25+
public Application(IntPtr javaReference, JniHandleOwnership transfer)
26+
: base(() => new App(), javaReference, transfer)
27+
{
28+
ConfigureUniversalImageLoader();
29+
}
30+
31+
private static void ConfigureUniversalImageLoader()
32+
{
33+
// Create global configuration and initialize ImageLoader with this config
34+
ImageLoaderConfiguration config = new ImageLoaderConfiguration
35+
.Builder(Context)
36+
.Build();
37+
38+
ImageLoader.Instance.Init(config);
39+
40+
ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync;
41+
}
42+
}
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Android.App;
2+
using Android.Widget;
3+
using Android.OS;
4+
using Android.Content.PM;
5+
using Android.Views;
6+
7+
namespace UnoDirectoryBuildProps
8+
{
9+
[Activity(
10+
MainLauncher = true,
11+
ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges,
12+
WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden
13+
)]
14+
public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity
15+
{
16+
}
17+
}
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
To add cross-platform image assets for your Uno Platform app, use the Assets folder
2+
in the shared project instead. Resources in this folder are Android-only.
3+
4+
Images, layout descriptions, binary blobs and string dictionaries can be included
5+
in your application as resource files. Various Android APIs are designed to
6+
operate on the resource IDs instead of dealing with images, strings or binary blobs
7+
directly.
8+
9+
For example, a sample Android app that contains a user interface layout (main.axml),
10+
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
11+
would keep its resources in the "Resources" directory of the application:
12+
13+
Resources/
14+
drawable/
15+
icon.png
16+
17+
layout/
18+
main.axml
19+
20+
values/
21+
strings.xml
22+
23+
In order to get the build system to recognize Android resources, set the build action to
24+
"AndroidResource". The native Android APIs do not operate directly with filenames, but
25+
instead operate on resource IDs. When you compile an Android application that uses resources,
26+
the build system will package the resources for distribution and generate a class called "R"
27+
(this is an Android convention) that contains the tokens for each one of the resources
28+
included. For example, for the above Resources layout, this is what the R class would expose:
29+
30+
public class R {
31+
public class drawable {
32+
public const int icon = 0x123;
33+
}
34+
35+
public class layout {
36+
public const int main = 0x456;
37+
}
38+
39+
public class strings {
40+
public const int first_string = 0xabc;
41+
public const int second_string = 0xbcd;
42+
}
43+
}
44+
45+
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
46+
to reference the layout/main.axml file, or R.strings.first_string to reference the first
47+
string in the dictionary file values/strings.xml.
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="Hello">Hello World, Click Me!</string>
4+
<string name="ApplicationName">UnoDirectoryBuildProps</string>
5+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<resources>
3+
<style name="AppTheme" parent="Theme.AppCompat.Light">
4+
5+
<!-- This removes the ActionBar -->
6+
<item name="windowActionBar">false</item>
7+
<item name="android:windowActionBar">false</item>
8+
<item name="windowNoTitle">true</item>
9+
<item name="android:windowNoTitle">true</item>
10+
11+
</style>
12+
<style name="Theme.AppCompat.Translucent">
13+
<item name="android:windowIsTranslucent">true</item>
14+
<item name="android:windowAnimationStyle">@android:style/Animation</item>
15+
</style>
16+
17+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/
2+
MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=32m,soft-heap-limit=256m
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
</dict>
6+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleName</key>
6+
<string>UnoDirectoryBuildProps</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>UnoDirectoryBuildProps</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>com.companyname.changeme</string>
11+
<key>CFBundleShortVersionString</key>
12+
<string>1.0</string>
13+
<key>CFBundleVersion</key>
14+
<string>1.0</string>
15+
<key>UIDeviceFamily</key>
16+
<array>
17+
<integer>2</integer>
18+
</array>
19+
<key>LSApplicationCategoryType</key>
20+
<string>public.app-category.utilities</string>
21+
<key>UILaunchStoryboardName</key>
22+
<string>LaunchScreen</string>
23+
<key>UISupportedInterfaceOrientations</key>
24+
<array>
25+
<string>UIInterfaceOrientationPortrait</string>
26+
<string>UIInterfaceOrientationLandscapeLeft</string>
27+
<string>UIInterfaceOrientationLandscapeRight</string>
28+
</array>
29+
<key>XSAppIconAssets</key>
30+
<string>Media.xcassets/AppIcon.appiconset</string>
31+
<key>UIAppFonts</key>
32+
<array>
33+
<string>Fonts/uno-fluentui-assets.ttf</string>
34+
</array>
35+
36+
<!--
37+
Adjust this to your application's encryption usage.
38+
<key>ITSAppUsesNonExemptEncryption</key>
39+
<false/>
40+
-->
41+
42+
</dict>
43+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="5" launchScreen="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
5+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
6+
</dependencies>
7+
<scenes>
8+
<scene sceneID="4">
9+
<objects>
10+
<viewController id="5" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="2"/>
13+
<viewControllerLayoutGuide type="bottom" id="3"/>
14+
</layoutGuides>
15+
<view contentMode="scaleToFill" id="55" key="view">
16+
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
17+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18+
<color key="backgroundColor" colorSpace="custom" customColorSpace="sRGB" red="1" green="1" blue="1" alpha="1"/>
19+
<subviews>
20+
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="56" translatesAutoresizingMaskIntoConstraints="NO" image="SplashScreen.png">
21+
<rect key="frame" x="58" y="120" width="204" height="242"/>
22+
<constraints>
23+
<constraint id="91" firstItem="56" firstAttribute="width" constant="204"/>
24+
<constraint id="92" firstItem="56" firstAttribute="height" constant="242"/>
25+
</constraints>
26+
</imageView>
27+
</subviews>
28+
<constraints>
29+
<constraint id="80" firstItem="55" firstAttribute="centerY" secondItem="56" secondAttribute="centerY" constant="0"/>
30+
<constraint id="81" firstItem="55" firstAttribute="centerX" secondItem="56" secondAttribute="centerX" constant="0"/>
31+
</constraints>
32+
</view>
33+
</viewController>
34+
<placeholder placeholderIdentifier="IBFirstResponder" id="7" userLabel="First Responder" sceneMemberID="firstResponder"/>
35+
</objects>
36+
<point key="canvasLocation" x="-300" y="-555"/>
37+
</scene>
38+
</scenes>
39+
<resources>
40+
<image name="[email protected]" width="40" height="40"/>
41+
<image name="[email protected]" width="60" height="60"/>
42+
<image name="[email protected]" width="76" height="76"/>
43+
<image name="[email protected]" width="40" height="40"/>
44+
<image name="Icon-Small.png" width="29" height="29"/>
45+
<image name="SplashScreen.png" width="620" height="300"/>
46+
</resources>
47+
<simulatedMetricsContainer key="defaultSimulatedMetrics">
48+
<simulatedStatusBarMetrics key="statusBar"/>
49+
<simulatedOrientationMetrics key="orientation"/>
50+
<simulatedScreenMetrics key="destination"/>
51+
</simulatedMetricsContainer>
52+
</document>

0 commit comments

Comments
 (0)