Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ updates:
- "/src/r8"
- "/src/manifestmerger"
- "/src/proguard-android"
- "/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/java/JavaLib"
schedule:
interval: "weekly"
- package-ecosystem: "gitsubmodule"
Expand Down
12 changes: 11 additions & 1 deletion .github/instructions/gradle.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,19 @@ Test the CI path locally: `$env:RunningOnCI='true'` (PowerShell) or `RunningOnCI
The new package isn't cached in the feed yet. One-time setup, then ingest:

1. `iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) }"` (or the `.sh` equivalent)
2. `$env:RunningOnCI='true'; ./build-tools/gradle/gradlew.bat --project-dir src/<project> build` — sign in via the device-flow prompt; the feed proxies + caches the package.
2. ```powershell
$env:RunningOnCI='true'
$env:NUGET_CREDENTIALPROVIDER_VSTS_TOKENTYPE='SelfDescribing'
./build-tools/gradle/gradlew.bat --project-dir src/<project> build
```
Sign in via the popup; the feed proxies + caches the package. `SelfDescribing` is required — the default `Compact` token is rejected by the feed when ingesting plugin markers (e.g. AGP plugin from `pluginManagement`).
3. Re-run CI on the Dependabot PR. No PR edit needed.

If the popup never appears or auth keeps cancelling, clear the cached session token and try again:
```powershell
Remove-Item "$env:LOCALAPPDATA\MicrosoftCredentialProvider\SessionTokenCache.dat" -ErrorAction SilentlyContinue
```

The credprovider plugin is a no-op when no AzDO repos are configured (i.e. local builds without `RunningOnCI`).

## Don'ts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/proguard-android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.android.application' version '8.7.0'
id 'com.android.application' version '9.2.1'
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
mavenCentral()
}
plugins {
id 'com.android.library' version '9.2.1' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}

android {
compileSdkVersion 25
namespace 'com.example.javalib'
compileSdk 35

defaultConfig {
minSdkVersion 19
targetSdkVersion 25
minSdk 21
targetSdk 35
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.javalib">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
// See: eng/gradle/plugin-repositories.gradle, eng/gradle/dependency-repositories.gradle
pluginManagement {
apply from: "${rootDir}/../../../../../eng/gradle/plugin-repositories.gradle", to: pluginManagement
}

plugins {
id 'com.microsoft.azure.artifacts.credprovider' version '1.1.1'
}

dependencyResolutionManagement {
apply from: "${rootDir}/../../../../../eng/gradle/dependency-repositories.gradle", to: dependencyResolutionManagement
}

rootProject.name = 'JavaLib'
include ':library'
Loading