1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

リソースの拡張子を指定してフィルター

Posted at

いろいろ試行錯誤した結果こんな感じで書くのが一番綺麗かもしれない
例 ymlのトークンを置き換える場合

build.gradle
import org.apache.tools.ant.filters.ReplaceTokens

processResources {
    from sourceSets.main.resources.srcDirs
    filesMatching('**/*.yml') {
        filter ReplaceTokens, tokens: [version: version]
    }
}

いったん全部を取り込んでからfilesMatchingでファイルを指定してフィルターにかけるのがしっくり来た

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?