soft.build tools - jgrey4296/jgrey4296.github.io GitHub Wiki

Ref Build Tools

Main

dotnet

	dotnet --help

Basic Usage

dotnet --list-sdks
dotnet --list-runtimes
dotnet --help

dotnet nuget

build v publish

For .net < 3.0, build doesn’t copy nuget packages, uses global.

adding packages

dotnet add [proj] package [package]

Elixir / Erlang

ASDF

vms: https://github.com/asdf-vm/asdf

asdf --help

# Machine 1:
iex --name [email protected] --cookie test

# Machine 2:
iex --name [email protected] --cookie test
Node.connect :"[email protected]"
Node.list

Mix

mix --help

Rebar

Haskell

Cabal

Javascript

Grunt

	grunt --help

tasks

grunt.registerTask(name,description,function);
grunt.registerTask(name,[taskNames]);

// If the function has parameters:
grunt testTask:someParameter

grunt.fail.warn()
grunt.fail.fatal
grunt.log.[writeln,write,subhead,error,ok]();

grunt.file.[write,read,readJSON,delete,copy,mkdir]();
grunt.file.expand(); // -> returns an array with all files matching a pattern (use
grunt.file.recurse(); // -> expand path, return a callback???

this.requires([taksNames]);
this.name(); // -> name of the task;
this.args();

Plugins:

to install a plugin:

npm install grunt-contrib-**** --save-dev
// load the plugin in the gruntfile:
grunt.loadNpmTasks('grunt-contrib-****');

Top Plugins:

  • jshint (use .jshintrc for settings)
  • watch (to run tasks when files change)
  • uglify
  • clean
  • concat
  • connect
  • concurrent

npm

npm --help

JVM

Ant

Gradle

Startup

gradle.properties
init.gradle.kts
settings.gradle.kts

creates Settings objects.

adds libraries to build script classpath, defines which builds are participating. instantiates Project instances.

build.gradle.kts

evals task registration to build task hierarchy.

hooks: gradle.beforeProject {} gradle.afterProject {} tasks.whenTaskAdded {}

build.gradle.kts

task actions (doFirst, doLast..)

buildSrc

allows extraction of build logic into plugins. is essentially a subproject, so use a buildSrc/build.gradle.kts

Keytool

for creating keystores to deploy on android

keytool
-keyalg RSA
-genkeypair
-alias androiddebugkey
-keypass android
-keystore debug.keystore
-storepass android
-dname "CN=Android Debug,O=Android,C=US"
-validity 9999
-deststoretype pkcs12

Sdkman!

jvm!
sdk install java
sdk install scala 3.3.3

sdk uninstall scala
sdk use scala 3.3.3
sdk default scala 3.3.3
sdk current
sdk current java
sdk version

Use ‘.sdkmanrc’ files to setup local environments

Sdkmanager

management of different jdks and android sdk’s

Linux Install

install straight from above link

Mac Install

on mac, bootstrap with: brew install –cask android-studio brew install –cask android-commandlinetools then use that sdkmanager to install actual sdks etc in $android_home add installed java versions using jenv, activate as necessary

Lisp

Doom

Emacs Straight Recipes

;; Disable Byte Compilation
(package! a-package :recipe (:build (:not compile)))
;; Or disable byte compilation with
;; -*- no-byte-compile: t; -*-

;; Specify a local repo
(package! a-package :recipe (:local-repo "~/.doom.d/packages/a-package"))

Ocaml / Coq

Opam

opam --help

Python

Build

python -m build ./

Twine

twine upload -u __token__ -p {password} ./dist/*

Conda

Mamba

 # export a yaml spec of the current env
	mamba create -f env.yml
 # create a new env
	mamba create -n {env-name} --file {filespec}
 # or
 mamba create -n {env-name} python=3.12

Pip

pip install [opt]

Poetry

Scons

uv

Ruby

RubyGems

Rust

Cargo

remove ~/.cargo/packages.cache if it locks

rustup

rustup component add rustfmt-preview rustfix clippy rust-analyzer rust-gdb

Meson

Nix

Make

	make --help

Grunt

# To set up an npm package.json:
npm init

# To install and add to dependency list:
npm install <package> --save-dev

General Use

grunt.registerTask(name,description,function);
grunt.registerTask(name,[taskNames]);
# If the function has parameters, they are passed in as part of the command line args
grunt testTask:someParameter

Task Authoring

// Warnings and errors:
grunt.fail.warn()
grunt.fail.fatal

// Logs:
grunt.log.[writeln,write,subhead,error,ok]();

// Files:
grunt.file.[write,read,readJSON,delete,copy,mkdir]();
grunt.file.expand(); -> returns an array with all files matching a pattern (use ! to exclude)
grunt.file.recurse(); -> expand path, return a callback???

// Task internal Methods:
this.requires([taksNames]);
this.name() -> name of the task;
this.args();

Plugins:

# to install a plugin:
npm install grunt-contrib-**** --save-dev
// load the plugin in the gruntfile:
grunt.loadNpmTasks('grunt-contrib-****');

Top Plugins:

  • jshint (use .jshintrc for settings)
  • watch (to run tasks when files change)
  • uglify
  • jclean
  • concat
  • connect
  • concurrent

Links

⚠️ **GitHub.com Fallback** ⚠️