@@ -103,18 +103,21 @@ CoreTestHelper exitProjectConstruction() {
103103 * root to project root dir, command to compile the project and the computed paths to config files
104104 * which will be passed through gradle command line arguments.
105105 *
106- * @param outDirPath Path to serialization output directory,
106+ * @param outDirPath Path to serialization output directory,
107+ * @param jSpecifyEnabled Flag to enable jSpecify
107108 * @return The command to build the project including the command line arguments, this command can
108- * * be executed from any directory.
109+ * * be executed from any directory.
109110 */
110- public String computeTargetBuildCommand (Path outDirPath ) {
111+ public String computeTargetBuildCommand (Path outDirPath , boolean jSpecifyEnabled ) {
111112 return String .format (
112- "%s && ./gradlew %s %s -Plibrary-model-loader-path=%s --rerun-tasks" ,
113+ "%s && ./gradlew %s %s -Plibrary-model-loader-path=%s -Pjspecify=%s - -rerun-tasks" ,
113114 Utility .changeDirCommand (pathToProject ),
114115 computeCompileGradleCommandForModules (modules .subList (0 , 1 )),
115116 String .join (" " , Utility .computeConfigPathsWithGradleArguments (outDirPath , modules )),
116117 Utility .getPathToLibraryModel (outDirPath )
117- .resolve (Paths .get ("build" , "libs" , "librarymodel.jar" )));
118+ .resolve (Paths .get ("build" , "libs" , "librarymodel.jar" )),
119+ jSpecifyEnabled
120+ );
118121 }
119122
120123 /**
@@ -123,19 +126,21 @@ public String computeTargetBuildCommand(Path outDirPath) {
123126 * loader jar and the computed paths to config files which will be passed through gradle command
124127 * line arguments.
125128 *
126- * @param outDirPath Path to serialization output directory,
129+ * @param outDirPath Path to serialization output directory,
130+ * @param jSpecifyEnabled Flag to enable jSpecify
127131 * @return The command to build the project including the command line arguments, this command can
128- * * be executed from any directory.
132+ * * be executed from any directory.
129133 */
130- public String computeTargetBuildCommandWithLibraryModelLoaderDependency (Path outDirPath ) {
134+ public String computeTargetBuildCommandWithLibraryModelLoaderDependency (Path outDirPath , boolean jSpecifyEnabled ) {
131135 return String .format (
132- "%s && ./gradlew library-model-loader:jar --rerun-tasks && %s && ./gradlew %s %s -Plibrary-model-loader-path=%s --rerun-tasks" ,
136+ "%s && ./gradlew library-model-loader:jar --rerun-tasks && %s && ./gradlew %s %s -Plibrary-model-loader-path=%s -Pjspecify=%s - -rerun-tasks" ,
133137 Utility .changeDirCommand (outDirPath .resolve ("Annotator" )),
134138 Utility .changeDirCommand (pathToProject ),
135139 computeCompileGradleCommandForModules (modules .subList (0 , 1 )),
136140 String .join (" " , Utility .computeConfigPathsWithGradleArguments (outDirPath , modules )),
137141 Utility .getPathToLibraryModel (outDirPath )
138- .resolve (Paths .get ("build" , "libs" , "librarymodel.jar" )));
142+ .resolve (Paths .get ("build" , "libs" , "librarymodel.jar" )),
143+ jSpecifyEnabled );
139144 }
140145
141146 /**
@@ -144,20 +149,23 @@ public String computeTargetBuildCommandWithLibraryModelLoaderDependency(Path out
144149 * loader jar and the computed paths to config files which will be passed through gradle command
145150 * line arguments.
146151 *
147- * @param outDirPath Path to serialization output directory,
152+ * @param outDirPath Path to serialization output directory,
153+ * @param jSpecifyEnabled Flag to enable jSpecify
148154 * @return The command to build the project including the command line arguments, this command can
149- * * be executed from any directory.
155+ * * be executed from any directory.
150156 */
151157 public String computeDownstreamDependencyBuildCommandWithLibraryModelLoaderDependency (
152- Path outDirPath ) {
158+ Path outDirPath , boolean jSpecifyEnabled ) {
153159 return String .format (
154- "%s && ./gradlew library-model-loader:jar --rerun-tasks && %s && ./gradlew %s %s -Plibrary-model-loader-path=%s --rerun-tasks" ,
160+ "%s && ./gradlew library-model-loader:jar --rerun-tasks && %s && ./gradlew %s %s -Plibrary-model-loader-path=%s -Pjspecify=%s - -rerun-tasks" ,
155161 Utility .changeDirCommand (outDirPath .resolve ("Annotator" )),
156162 Utility .changeDirCommand (pathToProject ),
157163 computeCompileGradleCommandForModules (modules .subList (1 , modules .size ())),
158164 String .join (" " , Utility .computeConfigPathsWithGradleArguments (outDirPath , modules )),
159165 Utility .getPathToLibraryModel (outDirPath )
160- .resolve (Paths .get ("build" , "libs" , "librarymodel.jar" )));
166+ .resolve (Paths .get ("build" , "libs" , "librarymodel.jar" )),
167+ jSpecifyEnabled
168+ );
161169 }
162170
163171 /**
0 commit comments