Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for expansions other than in module.properties #26

Open
thijslemmens opened this issue Sep 5, 2019 · 1 comment
Open

Add support for expansions other than in module.properties #26

thijslemmens opened this issue Sep 5, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@thijslemmens
Copy link
Contributor

thijslemmens commented Sep 5, 2019

@bhagyas poked me on the Alfresco discord about expansions in xml files inside the config directory in an amp. He found a workaround, but we should probably enable a more elegant way to do that.

@thijslemmens thijslemmens added the enhancement New feature or request label Sep 5, 2019
@bhagyas
Copy link
Contributor

bhagyas commented Sep 5, 2019

(With Gradle 5.6, I used my fork of the SDK project.)
I used the following:

/**
 * Replaces tokens in xml files.
 */
task replaceTokens(type: Copy) {
  from("src/main/amp/config") {
    include '**/*.xml'

    //ignore context and patches
    exclude '**/context/*'
    exclude '**/patches/*'

    //replace version property
    expand('version': version)
  }
  into tokenReplacedDir
  sourceSets.main.amp.config.srcDirs += tokenReplacedDir
}

whereas tokenReplacedDir was declared as $buildDir/replaced-files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants