Reputation: 2549
In file build.gradle of my Java project i add applicationDefaultJvmArgs
as bellow
applicationDefaultJvmArgs = ['-Xmx512m', '-XX:MaxPermSize=512m', '-Dinm.testmode=true', '-Dfile.encoding=UTF-8', '-Xdebug','-Xrunjdwp:transport=dt_socket,server=y,address=7979,suspend=n']
and i get error
Could not set unknown property 'applicationDefaultJvmArgs' for root project
How can i fix it ?
Upvotes: 2
Views: 3536
Reputation: 6770
applicationDefaultJvmArgs
is a property of the Application Plugin and must be defined in the application
configuration closure:
plugins {
id 'application'
}
application {
applicationDefaultJvmArgs = ['-Xmx512m', '-XX:MaxPermSize=512m', '-Dinm.testmode=true', '-Dfile.encoding=UTF-8', '-Xdebug','-Xrunjdwp:transport=dt_socket,server=y,address=7979,suspend=n']
}
See the application plugin's Usage guide for more examples.
Upvotes: 4