Граф коммитов

3739 Коммитов

Автор SHA1 Сообщение Дата
moljac 26528232d6 more metadata fixes 2024-08-29 22:50:03 +02:00
James Crutchley 98da3c6c19
Remove incorrect `<attr>` an fix `Player.listener` to only remove the depracted method and not the one that is not deprecated. 2024-08-28 14:20:31 -07:00
James Crutchley be15bd89d0
- Removed `remove-node` directive for `onCues` method. 2024-08-28 07:44:16 -07:00
James Crutchley 379c161944
Refactor Player.Listener and update metadata
- Removed `onCues` method in `Player.Listener`.
- Removed `onPositionDiscontinuity` method from `Player.Listener`.
- Added `<remove-node>` tags to address issues with `Media3.ExoPlayer`.
- Made all methods in `Player.Listener` interface abstract.
2024-08-28 04:02:08 -07:00
moljac c78413c3ac metadata fixes 2024-08-28 12:29:51 +02:00
moljac cb994487bf binderagtor green 2024-08-28 12:29:36 +02:00
moljac 0febd63147
Merge pull request #948 from xamarin/mu-20240826-alignment-bumps
Manual updates 20240826 alignment bumps
2024-08-28 08:37:31 +02:00
moljac 95a1238889 automatic files 2024-08-27 09:04:20 +02:00
moljac 6c6a135db7 fix for local builds to use generated nugets which are published as preview 2024-08-27 09:04:07 +02:00
moljac 6838af43e2 binderator green 2024-08-27 09:03:22 +02:00
Jonathan Pobst d126bba06d
Track latest versions of GPS dependencies. (#946) 2024-08-23 07:09:39 -10:00
Jonathan Pobst ac1f49730b
Remove some package-specific templates. (#943)
Remove the following package-specific templates in favor of using the default template:

- accompanist
- antmedia-rtpm-client
- auto-value
- dev-chrisbanes-snapper
- flogger
- napier
- reactive-streams
- rxjava
- tink

Additionally, the `Xamarin.Android.ReactiveX.RxJava` NuGet package was relying on a `<JavaSourceJar>` for some parameter names.  

Add the artifact-level `documentationType` field to `config.json` that can be specified if a `<JavaSourceJar>` or `<JavaDocJar>` is needed.  The default value is `none`, the values `javasource` and `javadoc` are supported.
2024-08-22 19:10:43 -10:00
Jonathan Pobst d8ae98125e
[binderator] Tweaks to `update-config` console output. (#945)
Make 2 tweaks to the `update-config` console output.  Note these do not affect anything that is written to `config.json`, just what is written to the console.

- Add number of packages and dependencies to table header:

```console
| 340 Packages (* = Has Update)                              | Currently Bound   | Latest Stable   |
|------------------------------------------------------------|-------------------|-----------------|
| androidx.activity.activity                                 | 1.9.1             | 1.9.1           |
...

| 18 Dependencies (* = Has Update)                           | Current Reference | Latest Publish  |
|------------------------------------------------------------|-------------------|-----------------|
| Xamarin.GooglePlayServices.Ads.Identifier                  | 118.1.0.1         | 118.1.0.1       |
...
```

- Show if there are updates available for "Frozen" packages.  Previously it would just show as frozen and not show if there were updates available.

```console
// Previous behavior
| # com.google.android.material.material                     | 1.11.0            | 1.11.0          |

// New behavior
| #* com.google.android.material.material                    | 1.11.0            | 1.12.0          |
```
2024-08-22 19:10:20 -10:00
Jonathan Pobst a9594744db
[binderator] Add binding type and use it to remove 'gson' template. (#941)
Some of the final pieces needed to start removing package-specific templates:

- We use the top level `mavenRepositoryType` to default all packages to Google's Maven, and then use the templates to override this to `MavenCentral`. Without templates we will need to specify this directly on the artifact, so add support for an artifact level `mavenRepositoryType`.

- We have several different "types" of packages that we create today:
  - `EmbeddedJar` - Basic use of `<EmbeddedJar>` to include the Java payload in the NuGet package next to the managed bindings `.dll`. (This is equivalent to the preferred `<AndroidLibrary>` in .NET 6+.)
  - `Targets` - Uses `<InputJar>` to create the binding `.dll` and `<None>` to add the Java payload manually into the NuGet package and uses a `.targets` file to add it to the Android application.
  - `NoBindings` - Uses `<None>` to add the Java payload manually into the NuGet package and uses a `.targets` file to add it to the Android application. Does not create managed bindings.
  - `XBD` - Uses `<InputJar>` to create the binding `.dll`. The Java payload is not included in the NuGet package. Instead a `.targets` file is used to download the payload at compile time using `Xamarin.Build.Download`.

The default package type is `targets`, which is what the current default template uses. That is, this is the one that all AndroidX packages currently use.

To specify a different package type, we add a new artifact level `type` attribute. The only currently supported value for this is `androidlibrary` which provides the `EmbeddedJar` package type behavior.

As a proof of concept, migrate `GoogleGson` from the `gson` template to the default template.

### Results
Before:
```json
{
  "groupId": "com.google.code.gson",
  "artifactId": "gson",
  "version": "2.11.0",
  "nugetVersion": "2.11.0.1",
  "nugetId": "GoogleGson",
  "dependencyOnly": false,
  "templateSet": "gson"
}
```
![image](https://github.com/user-attachments/assets/968d3251-52fc-449f-a629-f28c86b44321)

After:
```json
{
  "groupId": "com.google.code.gson",
  "artifactId": "gson",
  "version": "2.11.0",
  "nugetVersion": "2.11.0.1",
  "nugetId": "GoogleGson",
  "dependencyOnly": false,
  "type": "androidlibrary",
  "mavenRepositoryType": "MavenCentral"
}
```
![image](https://github.com/user-attachments/assets/97bed63c-10c3-4827-992c-669f153f8c12)
2024-08-22 08:36:57 -10:00
Jonathan Pobst ff23d907e5
Remove 'update-config.csx'. (#942)
The `update-config.csx` script should no longer be used in AndroidX repository.

Instead, use one of the following:

- `dotnet cake -t=update-config`
- `dotnet cake -t=bump-config`
- `dotnet cake -t=sort-config`
- `dotnet cake -t=published-config`

Commands are documented [here](https://github.com/xamarin/AndroidX/blob/main/BUILDING.md).
2024-08-21 09:07:51 -10:00
moljac f70f4e6e49
Merge pull request #936 from xamarin/wsu-20240806
Weeklt Stable Updates 20240806
2024-08-19 20:01:00 +02:00
moljac 0404d81f34
Merge branch 'main' into wsu-20240806 2024-08-18 10:42:05 +02:00
Jonathan Pobst 874077d409
[ci] Update to latest .NET 8: 8.0.400. (#934) 2024-08-16 07:45:31 -10:00
Jonathan Pobst c894fc35d8
[binderator] Generate 'THIRD-PARTY-NOTICES' from POM information. (#937)
Instead of manually maintaining licensing information for packages, pull the license information from the package's POM file.  This information looks like:

```xml
<licenses>
  <license>
    <name>The Apache Software License, Version 2.0</name>
    <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    <distribution>repo</distribution>
  </license>
</licenses>
```

We need to be able to "understand" this license and properties about it, like its SPDX identifier and whether it is proprietary or not.  To do this, we match the license name to a new section in `config.json`:

```json
"licenses": [
  {
    "name": "The Apache Software License, Version 2.0",
    "file": "templates/licenses/apache-2.0.txt",
    "spdx": "Apache-2.0",
    "proprietary": false
  }, ...
]
```

Note there may be multiple entries for the "same" license, as different POM files may give it a slightly different name.

These license entries also point to a local copy of the license text that we can use to build `THIRD-PARTY-NOTICES.txt` when `binderator` runs.

Modify the project template to include the generated `THIRD-PARTY-NOTICES.txt` which contains the correct notices for each package rather than the generic repo `External-Dependency-Info.txt` which was not correct for packages not licensed under Apache-2.0.

Finally, if the package is open source and all its license(s) have valid SPDX identifiers, calculate the compound SPDX expression and apply it to the package with `<PackageLicenseExpression>`. If not, use `<PackageLicenseFile>` instead.  (SPDX doesn't allow a "proprietary" identifier.)

Note in some cases we may not be able to automatically pull license information from the POM. In these cases we can override the POM information with a new `overrideLicenses` entry on an artifact in `config.json`:

```json
"overrideLicenses": [
  "Apache 2.0|http://www.apache.org/licenses/LICENSE-2.0.txt"
],
```

The format is `{license name}|{license url}`.
2024-08-16 07:45:06 -10:00
moljac f8055598f0 fix to exclude recursive nuget api-scans (some GPS-FB-MLKit packages were scanned) 2024-08-15 14:09:44 +02:00
moljac 97f68edf37
Merge branch 'main' into wsu-20240806 2024-08-14 21:25:48 +02:00
Jonathan Pobst 8910d0537d
[Tests] Fix path separator issues on Mac. (#939) 2024-08-14 09:07:29 -10:00
moljac 05d57bfd47
Merge branch 'main' into wsu-20240806 2024-08-13 20:21:30 +02:00
moljac a2678906ba automatic files 2024-08-13 20:18:48 +02:00
moljac 0dc854e987 spel checking 2024-08-13 20:18:37 +02:00
moljac e4c3f0c1d5 metadata fixes 2024-08-13 20:18:29 +02:00
moljac 1fcce16a40 binderator green 2024-08-13 20:17:46 +02:00
Jonathan Pobst 8031c59263
Remove 'samples' directory. (#933)
In https://github.com/xamarin/AndroidX/pull/925, we converted the custom "samples" tests into NUnit unit tests, but did not remove the old tests.

Remove the `samples` directory and change the Cake targets like `ci-samples` to run the new NUnit tests.
2024-08-12 07:40:59 -10:00
Jonathan Pobst 646527a687
Begin streamlining default template. (#932)
Begin streamlining and updating the default project template.  There are two goals here:

- Modernize appearance and metadata by removing "Xamarin" branding and verbiage, shifting more towards ".NET for Android" branding.
- Begin making the default project template more generic and configurable via `config.json`. The desire here is to reduce maintenance burden by making the default template flexible enough that library-specific templates (like `kotlin` or `tink`) are no longer required.  (Currently we maintain 46 template sets across AndroidX and GPS repos, the majority of which only have minor differences.)
2024-08-12 07:40:34 -10:00
Jonathan Pobst 0835812542
Streamline "LICENSE" handling. (#931)
Reduce maintenance costs by creating a generic `PackageLicense.md` file that can be used by all packages.  Instead of listing package-specific licensing, it points to the existing `THIRD-PARTY-NOTICES.txt` file which already contains package-specific licensing.

Additionally, this is done as `PackageLicense.md` instead of the root `LICENSE.md` because it is specific to the packages we ship and not necessarily to the code in this repository.  That is, the package-specific wording does not apply to things like the `binderator` code that exists in this repository.

Also, mentions of `Xamarin` were replaced with `Microsoft`.

Finally, pull in the standard `dotnet` `LICENSE.txt` for the repository level license, a la:
- https://github.com/dotnet/runtime/blob/main/LICENSE.TXT
- https://github.com/dotnet/android/blob/main/LICENSE.TXT
2024-08-07 07:36:14 -10:00
Jonathan Pobst 0b5c7f00bc
Package README tweaks. (#928)
There is some interesting content available in a Java `.pom` file that we can add to our package readme files:
- Developer(s)
- License(s)
- Description
- Project URL

Add this information, apply some formatting, and remove some less useful information that clutters the readme.  Mockup of the new layout on nuget.org:

![image](https://github.com/user-attachments/assets/336a2662-0076-4c12-87c0-20bc6d91ebed)

Other changes:
- `binderator` changes were required to pull in the new fields.  Switch to the in-tree version of `binderator` instead of publishing a new `dotnet tool` version.
- Our existing `readme.md` [doesn't work on nuget.org](https://www.nuget.org/packages/Xamarin.AndroidX.Core#readme-body-tab) because we are missing the `$(PackageReadmeFile)` property. Fix this.
- This `readme.md` is intentionally generic enough to be usable by all of our packages. Remove individual template copies.
2024-08-04 17:39:33 -10:00
Jonathan Pobst 3bf2dabc91
Convert "all packages" "samples" to proper unit tests. (#925)
Convert our existing `BuildAllDotNet`/`BuildAllMauiApp` samples to NUnit based unit tests.  These tests use `dotnet new android|maui` instead of committed projects so that we always ensure we are testing against the current templates that our users will be using.

Additionally, move these tests to another stage, so they can run in parallel with other [test suite(s)](https://github.com/xamarin/AndroidX/pull/892).

This PR does not remove the existing `BuildAll*` samples, those will be removed in a future PR.
2024-08-04 17:38:52 -10:00
Jonathan Pobst 6acd20e2e3
Move functionality from `update-config.csx` to `binderator`. (#927)
As the scope of `update-config.csx` has grown, it has become more and more painful that it isn't in an actual project editable in an IDE, making it harder to update or debug.  As it shares code with `binderator`, like reading and writing `config.json`, move the functionality into `binderator`.

To help facilitate running this functionality, add new targets to `cake` for the various operations:

*   `update-config`

    Updates config.json to the latest versions found in Maven.
    
*   `bump-config`

    Increments the NuGet patch version of all packages in config.json.
    
*   `sort-config`

    Sorts config.json file using the canonical sort.
    
*   `published-config`

    Shows which NuGet package versions in config.json have been published to NuGet.org.

Note these run the in-tree version of `binderator`, there is no need to install the .NET Global tool version to run these targets.
2024-08-01 07:33:37 -10:00
moljac 08ee35f0b4
Merge pull request #779 from xamarin/mu-20230329-androidx.media.players
Manual updates 20230329 androidx.media.players
2024-07-30 17:00:53 +02:00
moljac f6d69ed328 automatic files 2024-07-30 01:10:51 +02:00
moljac 141a1685c4
Merge branch 'main' into mu-20230329-androidx.media.players 2024-07-29 23:52:15 +02:00
moljac e2579e2a93 media2 added back to build 2024-07-29 23:22:39 +02:00
moljac a53e460dbd
Merge pull request #924 from xamarin/wsu-20240725
Weekly stable updates 20240725
2024-07-29 23:12:25 +02:00
moljac 6285f6d96a formatting fixed 2024-07-29 12:54:29 +02:00
moljac 82171c71d8 automatic files 2024-07-25 11:14:48 +02:00
moljac 15832d2af3 updates 2024-07-25 11:14:13 +02:00
moljac 3047a62973 Tink replaced with Ant-Media Librtmp 2024-07-22 16:36:04 +02:00
moljac 49a1ec4098 AntMedia Rtmp capitalization fixes 2024-07-22 15:33:03 +02:00
moljac 9bb07d8786 fixes for `AndroidX.Wear.WatchFace.Complications.Datasource` 2024-07-22 13:16:15 +02:00
moljac b808ee6de2 metadata fixes for Darasource/DataSource 2024-07-22 10:11:23 +02:00
moljac c2bdd96fbf automatic fies 2024-07-19 16:46:27 +02:00
moljac fa9ba21e49 media2 removed 2024-07-19 14:47:39 +02:00
moljac 82e4b962b3 template fixes 2024-07-19 10:26:27 +02:00
moljac cc77b10c24 media2 metadata removed 2024-07-19 09:57:47 +02:00
moljac d0729683b8 automatic files 2024-07-18 20:30:31 +02:00