File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,11 @@ tasks.register<Exec>("restrictDeletionOfJsonMappers") {
103
103
}
104
104
}
105
105
if (Os .isFamily(Os .FAMILY_UNIX )) {
106
- commandLine(" chmod" , " a-w" , " $buildDir /generated/source/kapt/main/META-INF/vertx" )
106
+ if (System .getProperty(" user.name" ) == " root" ) {
107
+ commandLine(" chattr" , " +i" , " $buildDir /generated/source/kapt/main/META-INF/vertx" )
108
+ } else {
109
+ commandLine(" chmod" , " a-w" , " $buildDir /generated/source/kapt/main/META-INF/vertx" )
110
+ }
107
111
} else {
108
112
executable(" cmd.exe" )
109
113
args(" /C" ) // no-op
@@ -115,7 +119,11 @@ tasks.register<Exec>("unrestrictDeletionOfJsonMappers") {
115
119
mustRunAfter(" compileKotlinJvm" )
116
120
if (Os .isFamily(Os .FAMILY_UNIX )) {
117
121
if (file(" $buildDir /generated/source/kapt/main/META-INF/vertx" ).exists()) {
118
- commandLine(" chmod" , " a+w" , " $buildDir /generated/source/kapt/main/META-INF/vertx" )
122
+ if (System .getProperty(" user.name" ) == " root" ) {
123
+ commandLine(" chattr" , " -i" , " $buildDir /generated/source/kapt/main/META-INF/vertx" )
124
+ } else {
125
+ commandLine(" chmod" , " a+w" , " $buildDir /generated/source/kapt/main/META-INF/vertx" )
126
+ }
119
127
} else {
120
128
commandLine(" true" ) // no-op
121
129
}
You can’t perform that action at this time.
0 commit comments