Skip to content

Commit 89695ef

Browse files
committed
feat: Initial commit
0 parents  commit 89695ef

10 files changed

Lines changed: 207 additions & 0 deletions

File tree

.github/workflows/common.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish
2+
on:
3+
workflow_call:
4+
inputs:
5+
lib-version:
6+
required: true
7+
type: string
8+
configuration:
9+
required: true
10+
type: string
11+
publish-package:
12+
default: false
13+
type: boolean
14+
15+
jobs:
16+
common:
17+
name: Build and Publish lib
18+
runs-on: [self-hosted, xamarin-android]
19+
steps:
20+
- name: Clean Workspace
21+
uses: mickem/clean-after-action@v1
22+
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
26+
- name: Modify AssemblyInfo files
27+
uses: mingjun97/file-regex-replace@v1
28+
with:
29+
regex: 'AssemblyVersion\("(.*?)"\)'
30+
replacement: 'AssemblyVersion("${{ inputs.lib-version }}")'
31+
include: 'AssemblyInfo.cs'
32+
33+
- name: Restore packages
34+
run: nuget restore AndroidX.Work.Testing.sln
35+
36+
- name: Build the lib
37+
run: msbuild AndroidX.Work.Testing.sln -p:Configuration=${{ inputs.configuration }} -clp:Summary
38+
39+
- name: Package the lib
40+
if: ${{ inputs.publish-package == true }}
41+
run: nuget pack AndroidX.Work.Testing/AndroidX.Work.Testing.csproj -properties Configuration=${{ inputs.configuration }} -Version ${{ inputs.lib-version }}
42+
43+
- name: Publish the lib
44+
if: ${{ inputs.publish-package == true }}
45+
run: nuget push *.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate

.github/workflows/pullrequest.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: PullRequest
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
uses: ./.github/workflows/common.yml
10+
with:
11+
lib-version: 1.0.${{ github.event.pull_request.number }}.${{ github.run_number }}
12+
configuration: Release
13+
secrets: inherit

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
publish:
11+
uses: ./.github/workflows/common.yml
12+
with:
13+
lib-version: ${{github.ref_name}}
14+
configuration: Release
15+
publish-package: true
16+
secrets: inherit

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Artifacts
2+
bin
3+
obj
4+
5+
# Visual studio
6+
.vs
7+
*.user
8+
9+
# Resharper
10+
_ReSharper.Caches
11+
12+
# NCrunch
13+
*.ncrunchsolution
14+
_NCrunch*

AndroidX.Work.Testing.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34728.123
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidX.Work.Testing", "AndroidX.Work.Testing\AndroidX.Work.Testing.csproj", "{900872E6-329C-4FAF-A35C-B11F452051E1}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{900872E6-329C-4FAF-A35C-B11F452051E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{900872E6-329C-4FAF-A35C-B11F452051E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{900872E6-329C-4FAF-A35C-B11F452051E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{900872E6-329C-4FAF-A35C-B11F452051E1}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {16E7C639-92C2-4C1D-9E4C-88E68020BC06}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{900872E6-329C-4FAF-A35C-B11F452051E1}</ProjectGuid>
9+
<ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10+
<TemplateGuid>{77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46}</TemplateGuid>
11+
<OutputType>Library</OutputType>
12+
<AppDesignerFolder>Properties</AppDesignerFolder>
13+
<RootNamespace>AndroidX.Work.Testing</RootNamespace>
14+
<AssemblyName>AndroidX.Work.Testing</AssemblyName>
15+
<FileAlignment>512</FileAlignment>
16+
<Deterministic>True</Deterministic>
17+
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
18+
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
19+
<AndroidClassParser>class-parse</AndroidClassParser>
20+
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
21+
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
22+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25+
<DebugSymbols>true</DebugSymbols>
26+
<DebugType>portable</DebugType>
27+
<Optimize>false</Optimize>
28+
<OutputPath>bin\Debug\</OutputPath>
29+
<DefineConstants>DEBUG;TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
<DocumentationFile>bin\Debug\AndroidX.Work.Testing.xml</DocumentationFile>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
35+
<DebugType>portable</DebugType>
36+
<Optimize>true</Optimize>
37+
<OutputPath>bin\Release\</OutputPath>
38+
<DefineConstants>TRACE</DefineConstants>
39+
<ErrorReport>prompt</ErrorReport>
40+
<WarningLevel>4</WarningLevel>
41+
</PropertyGroup>
42+
<ItemGroup>
43+
<Reference Include="Mono.Android" />
44+
<Reference Include="System" />
45+
<Reference Include="System.Core" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Compile Include="Properties\AssemblyInfo.cs" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<LibraryProjectZip Include="Jars\work-testing-2.9.0.aar" />
52+
</ItemGroup>
53+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
54+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
55+
Other similar extension points exist, see Microsoft.Common.targets.
56+
<Target Name="BeforeBuild">
57+
</Target>
58+
<Target Name="AfterBuild">
59+
</Target>
60+
-->
61+
</Project>
33.8 KB
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System.Reflection;
2+
using System.Runtime.InteropServices;
3+
4+
// General Information about an assembly is controlled through the following
5+
// set of attributes. Change these attribute values to modify the information
6+
// associated with an assembly.
7+
[assembly: AssemblyTitle("AndroidX.Work.Testing")]
8+
[assembly: AssemblyDescription("")]
9+
[assembly: AssemblyConfiguration("")]
10+
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyProduct("AndroidX.Work.Testing")]
12+
[assembly: AssemblyCopyright("Copyright © 2021")]
13+
[assembly: AssemblyTrademark("")]
14+
[assembly: AssemblyCulture("")]
15+
[assembly: ComVisible(false)]
16+
17+
// Version information for an assembly consists of the following four values:
18+
//
19+
// Major Version
20+
// Minor Version
21+
// Build Number
22+
// Revision
23+
[assembly: AssemblyVersion("1.0.0.0")]
24+
[assembly: AssemblyFileVersion("1.0.0.0")]

NOTICE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Custom Activity on Crash library
2+
Copyright (c) 2014-2017 Eduard Ereza, http://www.eduardereza.com/
3+
4+
This product is licensed under the terms of the Apache Software License 2.0. See the LICENSE file for the full license text.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This package add Xamarin Binding for Android Java library AndroidX.Work.Testing
2+
3+
.aar taken on maven repo: https://mvnrepository.com/artifact/androidx.work/work-testing/
4+
5+
Xamarin docs for inluding android library: https://docs.microsoft.com/fr-fr/xamarin/android/platform/binding-java-library/binding-an-aar

0 commit comments

Comments
 (0)