@@ -883,11 +883,28 @@ tasks.register('userdevExtrasReobf', ReobfuscateJar) {
883883}
884884
885885tasks. register(" cleanroomClientNsight" , Exec ) {
886+ def activity = props. nsight_activity
887+ if (! activity) {
888+ throw new InvalidUserDataException (" \" nsight_activity\" from \" gradle.properties\" must not be empty!" )
889+ }
890+
891+ def platform = props. nsight_platform
892+ if (! platform) {
893+ throw new InvalidUserDataException (" \" nsight_platform\" from \" gradle.properties\" must not be empty!" )
894+ }
895+ if (platform != " Windows" && platform != " Linux" ) {
896+ throw new InvalidUserDataException (" \" nsight_platform\" =$platform is an invalid value! Must be either Windows OR Linux." )
897+ }
898+
899+ def ngfxPath = props. nsight_ngfx_path
900+ if (! ngfxPath) {
901+ throw new InvalidUserDataException (" \" nsight_ngfx_path\" from \" gradle.properties\" must not be empty!" )
902+ }
903+
886904 def javaExecTask = tasks. named(' cleanroomClient' , JavaExec ). get()
887905 def workingDir = javaExecTask. workingDir. absolutePath
888906 def javaHome = javaExecTask. getJavaLauncher(). get(). getMetadata(). getInstallationPath(). asFile. absolutePath
889907 def gradleWrapperJar = project. rootDir. toPath(). resolve(" gradle/wrapper/gradle-wrapper.jar" ). toFile(). absolutePath
890- def ngfxPath = props. nsight_ngfx_path
891908
892909 println " Working Dir: $workingDir "
893910 println " Java Home: $javaHome "
@@ -904,8 +921,8 @@ tasks.register("cleanroomClientNsight", Exec) {
904921
905922 commandLine = [
906923 ngfxPath,
907- " --activity" , " \" Frame Debugger \" " ,
908- " --platform" , " \" Windows \" " ,
924+ " --activity" , activity ,
925+ " --platform" , platform ,
909926 " --wait-hotkey" ,
910927 " --dir" , workingDir,
911928 " --output-dir" , workingDir,
0 commit comments