Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
6ee314be
Commit
6ee314be
authored
Mar 21, 2018
by
Pavitra
Committed by
Evan W. Patton
Mar 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed duplicate methods
parent
bb22fead
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
24 deletions
+9
-24
appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
...rver/src/com/google/appinventor/buildserver/Compiler.java
+9
-24
No files found.
appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
View file @
6ee314be
...
...
@@ -883,8 +883,8 @@ public final class Compiler {
File
deployDir
=
createDir
(
buildDir
,
"deploy"
);
String
tmpPackageName
=
deployDir
.
getAbsolutePath
()
+
SLASH
+
project
.
getProjectName
()
+
".ap_"
;
File
srcJavaDir
=
createDir
ectory
(
buildDir
,
"generated/src"
);
File
rJavaDir
=
createDir
ectory
(
buildDir
,
"generated/symbols"
);
File
srcJavaDir
=
createDir
(
buildDir
,
"generated/src"
);
File
rJavaDir
=
createDir
(
buildDir
,
"generated/symbols"
);
if
(!
compiler
.
runAaptPackage
(
manifestFile
,
resDir
,
tmpPackageName
,
srcJavaDir
,
rJavaDir
))
{
return
false
;
}
...
...
@@ -918,7 +918,7 @@ public final class Compiler {
// method of identifying via a hash of the path won't work when files
// are copied into temporary storage) and processed via a hacked up version of
// Android SDK's Dex Ant task
File
tmpDir
=
createDir
ectory
(
buildDir
,
"tmp"
);
File
tmpDir
=
createDir
(
buildDir
,
"tmp"
);
String
dexedClassesDir
=
tmpDir
.
getAbsolutePath
();
if
(!
compiler
.
runDx
(
classesDir
,
dexedClassesDir
,
false
))
{
return
false
;
...
...
@@ -1586,9 +1586,9 @@ public final class Compiler {
* @return true on success, otherwise false
*/
private
boolean
attachAarLibraries
(
File
buildDir
)
{
final
File
explodedBaseDir
=
createDir
ectory
(
buildDir
,
"exploded-aars"
);
final
File
generatedDir
=
createDir
ectory
(
buildDir
,
"generated"
);
final
File
genSrcDir
=
createDir
ectory
(
generatedDir
,
"src"
);
final
File
explodedBaseDir
=
createDir
(
buildDir
,
"exploded-aars"
);
final
File
generatedDir
=
createDir
(
buildDir
,
"generated"
);
final
File
genSrcDir
=
createDir
(
generatedDir
,
"src"
);
explodedAarLibs
=
new
AARLibraries
(
genSrcDir
);
final
Set
<
String
>
processedLibs
=
new
HashSet
<>();
...
...
@@ -1664,9 +1664,9 @@ public final class Compiler {
*/
private
boolean
mergeResources
(
File
mainResDir
,
File
buildDir
,
String
aaptTool
)
{
// these should exist from earlier build steps
File
intermediates
=
createDir
ectory
(
buildDir
,
"intermediates"
);
File
resDir
=
createDir
ectory
(
intermediates
,
"res"
);
mergedResDir
=
createDir
ectory
(
resDir
,
"merged"
);
File
intermediates
=
createDir
(
buildDir
,
"intermediates"
);
File
resDir
=
createDir
(
intermediates
,
"res"
);
mergedResDir
=
createDir
(
resDir
,
"merged"
);
PngCruncher
cruncher
=
new
AaptCruncher
(
getResource
(
aaptTool
),
null
,
null
);
return
explodedAarLibs
.
mergeResources
(
mergedResDir
,
mainResDir
,
cruncher
);
}
...
...
@@ -1837,21 +1837,6 @@ public final class Compiler {
return
dir
;
}
/**
* Creates a new directory (if it doesn't exist already).
*
* @param parentDirectory parent directory of new directory
* @param name name of new directory
* @return new directory
*/
private
static
File
createDirectory
(
File
parentDirectory
,
String
name
)
{
File
dir
=
new
File
(
parentDirectory
,
name
);
if
(!
dir
.
exists
())
{
dir
.
mkdir
();
}
return
dir
;
}
private
static
int
setProgress
(
int
increments
)
{
Compiler
.
currentProgress
=
increments
;
LOG
.
info
(
"The current progress is "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment