Skip to content

feat(mps-gradle-plugin): set artifacts properties for external libraries - #60

Open
sergej-koscejev wants to merge 1 commit into
setup-external-onlyfrom
zip-layout-artifacts
Open

sergej-koscejev wants to merge 1 commit into
setup-external-onlyfrom
zip-layout-artifacts

Conversation

@sergej-koscejev

@sergej-koscejev sergej-koscejev commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

MPS build scripts now find external libraries packaged by this plugin without extra path variables. Our zip puts each published build's artifacts directory at the top level of the zip, and that directory name usually matches the MPS build project name. So after extraction, build/dependencies/X is the artifacts root of build project X.

 resolveMpsLibraries   (Sync -> build/dependencies)
+  doLast: write build/mps-libraries-artifacts.properties
+    artifacts.X=<build/dependencies/X>   for each top-level directory X

 generate<Name> / assemble<Name> / check<Name>     (Ant)
+  -propertyfile build/mps-libraries-artifacts.properties
   -D...                 # pathProperties / valueProperties, take precedence over the file
  • The values go through a file because the names are only known after extraction. A provider evaluated when the configuration cache is stored would run before extraction.
  • New public RunAnt.propertyFiles (@InputFiles), passed as -propertyfile. Ant gives -D properties precedence, so mpsDefaults.pathVariables still override everything.
  • For zips that weren't made by this plugin, extra top-level directories just produce unused properties.

Evidence

ProjectDependenciesTest, with external zip com.example:ext that contains ext/marker.txt:

:a:setup
  a/build/mps-libraries-artifacts.properties == { artifacts.ext = a/build/dependencies/ext }

:a:generateMain
  --dry-run: :a:resolveMpsLibraries before :a:generateMain
  propertyFiles contains a/build/mps-libraries-artifacts.properties
  • Before: no properties file, no propertyFiles on RunAnt.

    After: both new tests pass. :mps-gradle-plugin:check also passes, including FullBuildTest, a real MPS Ant build that now gets -propertyfile. So do checkApiCompatibility and checkReleaseVersions.

Merge Danger

Blast Radius: build scripts

Builds that set artifacts.X some other way still win if they use -D (pathVariables). Values set only as defaults inside the build model are now overridden by the extracted directory when the names match.

resolveMpsLibraries writes an artifacts.<name> property for each
top-level directory of the extracted libraries into a properties file,
which the Ant tasks of build scripts load with -propertyfile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant