build-script

Checkout using gradle script

牧云@^-^@ 提交于 2021-01-28 04:40:29
问题 I am new to gradle.I want to checkout remote repository using gradle script. It is possible to run shell command Inside gradle task to clone remote repository with datetime stamp shell commands. 回答1: Yes, you can use a gradle Exec type task to execute any arbitrary command in the OS shell. See documentation and examples here. You didn't say what type of repo you're using, but there is a gradle git plugin to do git operations including checkout. 回答2: Here's an example of how we do it: project

How to create a Simple Build Script for Visual Studio from the Command Line?

那年仲夏 提交于 2020-01-11 05:13:10
问题 I have a lot of Visual Studio Project Solutions in multiple directories (all with the extension .sln) and I want to write a simple batch script that will automatically build all solutions listed in the batch file. I am able to manually build a solution by starting up the Visual Studio Command Prompt (which is just a command-line instance with the following command executed "%comspec%" /k "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 After which I then build the project

How do I generate a text file during compile time and include its content in the output?

混江龙づ霸主 提交于 2020-01-05 11:49:54
问题 I'm trying to do almost the same as How to create a static string at compile time. build.rs use std::{env}; use std::path::Path; use std::io::{Write, BufWriter}; use std::fs::File; fn main() { let out_dir = env::var("OUT_DIR").unwrap(); let dest_path = Path::new(&out_dir).join("file_path.txt"); let mut f = BufWriter::new(File::create(&dest_path).unwrap()); let long_string = dest_path.display(); write!(f, "{}", long_string).unwrap(); } main.rs fn main() { static LONG_STRING: &'static str =

How to deal with Gradle and multi project configuration?

独自空忆成欢 提交于 2020-01-05 09:04:38
问题 I have several projects [A, B, C], A depends on B and C. I want to move my projects to a multi project build configuration. Today my projects live on SVN, completely isolated. I was wondering if the only way to use the multi project build feature is if I move the projects to the same repository, imagine something like: MyPorject --A ----build.gradle --B ---build.gradle --C ----build.gradle --build.gradle Suggestions are welcome! Thanks! 回答1: Well, I got 3 options from one guys of the Gradle

Adding dependency gives error: 'react-scripts' is not recognized as an internal or external command, operable program or batch file"

余生颓废 提交于 2020-01-01 19:15:08
问题 Does anyone else get this issue? When i go to create a new project using create-react-app, and i add any dependency to it other than the stock ones, i.e. react-redux, redux, react-router-dom, i get the following error: 'react-scripts' is not recognized as an internal or external command, operable program or batch file. I've tried building with different vs of the modules but that proved pointless. Any advice on why would be amazing. The versions of the modules are the latest ones. 回答1: You

Real Hierarchical Builds with SCons?

浪尽此生 提交于 2020-01-01 04:30:08
问题 So I've read the questions on here about hierarchical builds like: Creating a Hierarchical Build with SCons I want to do real hierarchical construction of two standalone repos that both use scons that I set up as sub-repos using mercurial. Below is the file layout that illustrates what I want to do. Desired Layout: project_root/ (new project that builds bar app using the libfoo built from source) libfoo_subrepo/ (standalone project repo from bitbucket) src/ SConscript libfoo.c libfoo.h test/

Writing to build directory info.plist using Xcode's “New Build System”

☆樱花仙子☆ 提交于 2019-12-30 10:54:04
问题 Before using the "New Build System", we had a build phase script like this: infoplist="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" builddate=`date` /usr/libexec/PlistBuddy -c "Set :BuildDateString $builddate" "${infoplist}" The point of this way to write to the plist at runtime without dirtying the project and having to stash the changes. This still works well and perfectly when using the "Legacy Build System". On the "New Build System", this script does not work. The directory variables and writing

Writing to build directory info.plist using Xcode's “New Build System”

浪尽此生 提交于 2019-12-30 10:53:28
问题 Before using the "New Build System", we had a build phase script like this: infoplist="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" builddate=`date` /usr/libexec/PlistBuddy -c "Set :BuildDateString $builddate" "${infoplist}" The point of this way to write to the plist at runtime without dirtying the project and having to stash the changes. This still works well and perfectly when using the "Legacy Build System". On the "New Build System", this script does not work. The directory variables and writing

Writing to build directory info.plist using Xcode's “New Build System”

為{幸葍}努か 提交于 2019-12-30 10:53:28
问题 Before using the "New Build System", we had a build phase script like this: infoplist="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" builddate=`date` /usr/libexec/PlistBuddy -c "Set :BuildDateString $builddate" "${infoplist}" The point of this way to write to the plist at runtime without dirtying the project and having to stash the changes. This still works well and perfectly when using the "Legacy Build System". On the "New Build System", this script does not work. The directory variables and writing

Gradle creating duplicate start scripts into bin directory

自古美人都是妖i 提交于 2019-12-23 10:16:24
问题 I am trying to create multiple start script files through gradle. But somehow one particular start script file is getting duplicated. startScripts.enabled = false run.enabled = false def createScript(project, mainClass, name) { project.tasks.create(name: name, type: CreateStartScripts) { outputDir = new File(project.buildDir, 'scripts') mainClassName = mainClass applicationName = name classpath = jar.outputs.files + project.configurations.runtime doLast { def windowsScriptFile = file