Skip to content

Commit 98e423c

Browse files
authored
Merge pull request #1256 from dotMorten/patch-1
Only do Android version check on applications
2 parents 4169640 + 93c4855 commit 98e423c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Nerdbank.GitVersioning.Tasks/build/Nerdbank.GitVersioning.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@
274274
The major version must not exceed 124 to guarantee that the overall integer never exceeds 2100000000 even with the other numbers added.
275275
Other components are also limited since they must fit within the 8 or 16 bits allowed for them.
276276
Learn more from https://developer.android.com/studio/publish/versioning. -->
277-
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Major) &gt; 124" Text="Major version must not exceed 124 per Android versioning rules." />
278-
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Minor) &gt; 255" Text="Minor version must not exceed 256 per Android versioning rules." />
279-
<Error Condition="$(BuildNumber) &gt; 65535" Text="Build number must not exceed 65535 per Android versioning rules." />
277+
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Major) &gt; 124 AND '$(OutputType)'=='Exe'" Text="Major version must not exceed 124 per Android versioning rules." />
278+
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Minor) &gt; 255 AND '$(OutputType)'=='Exe'" Text="Minor version must not exceed 256 per Android versioning rules." />
279+
<Error Condition="$(BuildNumber) &gt; 65535 AND '$(OutputType)'=='Exe'" Text="Build number must not exceed 65535 per Android versioning rules." />
280280
<PropertyGroup>
281281
<_NBGV_Major_Shifted>$([MSBuild]::Multiply($([System.Version]::Parse('$(BuildVersion)').Major), 16777216))</_NBGV_Major_Shifted>
282282
<_NBGV_Minor_Shifted>$([MSBuild]::Multiply($([System.Version]::Parse('$(BuildVersion)').Minor), 65536))</_NBGV_Minor_Shifted>

0 commit comments

Comments
 (0)