Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1025016 // packageModules - directly make a runnable jar from modules

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (14632L/111K).

1  
!7
2  
3  
static File packageModules(Standalone_OSWithSplashScreens s, O... _) {
4  
  File outJar = javaxArtifactsDir(replace(s.programName, " ", "-") + ".jar");
5  
  ProgramPackager p = new (outJar, #1025015);
6  
  optPar Cl<S> excludeSnippets;
7  
  optPar Cl<S> extraSnippets;
8  
  p.extraSnippets = concatLists(extraSnippets, map beforeSlash_orAll(concatLists(oddEntries(s.mainModules), oddEntries(s.helperModules))));
9  
  print("Have extra snippets: " + p.extraSnippets);
10  
  p.excludeSnippets = excludeSnippets != null ? asSet(excludeSnippets)
11  
    : programPackager_standardExcludedSnippets();
12  
  p.copyAdditionalFiles = voidfunc(ZipOutputStream jar) {
13  
    addTextFileToZip(jar, "start.struct", struct(s));
14  
  };
15  
  p.includeBinaries = boolPar includeBinaries(_);
16  
  p.includeCompiler = boolPar includeCompiler(_);
17  
  p.includeSources = boolPar includeSources(_);
18  
  p.go();
19  
  ret outJar;
20  
}

Author comment

Began life as a copy of #1024623

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025016
Snippet name: packageModules - directly make a runnable jar from modules
Eternal ID of this version: #1025016/13
Text MD5: 330ee31641ed3a883fdb873acac86caa
Transpilation MD5: e20be5f37177a061e08a3bb02c101036
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-01 17:38:27
Source code size: 883 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 260 / 420
Version history: 12 change(s)
Referenced in: [show references]