File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
build-tools-internal/src/main/groovy Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -142,13 +142,18 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
142142 description = ' Enables preview features on native library module'
143143 dependsOn tasks. named(" enableExternalConfiguration" )
144144
145- doLast {
146- [ ' main ' , ' test ' ] . each { sourceSet ->
147- modifyXml(" .idea/modules/libs/native/elasticsearch.libs.native. ${ sourceSet } .iml " ) { xml ->
148- xml. component. find { it. ' @name' == ' NewModuleRootManager' }?. ' @LANGUAGE_LEVEL' = ' JDK_21_PREVIEW '
145+ ext {
146+ enablePreview = { moduleFile , languageLevel ->
147+ modifyXml(moduleFile ) { xml ->
148+ xml. component. find { it. ' @name' == ' NewModuleRootManager' }?. ' @LANGUAGE_LEVEL' = languageLevel
149149 }
150150 }
151151 }
152+
153+ doLast {
154+ enablePreview(' .idea/modules/libs/native/elasticsearch.libs.native.main.iml' , ' JDK_21_PREVIEW' )
155+ enablePreview(' .idea/modules/libs/native/elasticsearch.libs.native.test.iml' , ' JDK_21_PREVIEW' )
156+ }
152157 }
153158
154159 tasks. register(' buildDependencyArtifacts' ) {
You can’t perform that action at this time.
0 commit comments