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
f25c4117
Commit
f25c4117
authored
Jan 08, 2019
by
Evan W. Patton
Committed by
Jeffrey Schiller
Apr 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up old blocks editor code
Change-Id: I44ce7d4cda5623b482283c30ebb63aea9053da83
parent
85c3dc36
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
5 additions
and
190 deletions
+5
-190
appinventor/appengine/build.xml
appinventor/appengine/build.xml
+4
-8
appinventor/appengine/src/com/google/appinventor/YaClient.gwt.xml
...tor/appengine/src/com/google/appinventor/YaClient.gwt.xml
+0
-3
appinventor/appengine/src/com/google/appinventor/server/util/ResourceUtil.java
.../src/com/google/appinventor/server/util/ResourceUtil.java
+0
-56
appinventor/build-common.xml
appinventor/build-common.xml
+0
-11
appinventor/common/build.xml
appinventor/common/build.xml
+1
-31
appinventor/common/src/com/google/appinventor/common/BlocksEditorHttpConstants.gwt.xml
...ogle/appinventor/common/BlocksEditorHttpConstants.gwt.xml
+0
-5
appinventor/common/src/com/google/appinventor/common/youngandroid/YaHttpServerConstants.java
...ppinventor/common/youngandroid/YaHttpServerConstants.java
+0
-61
appinventor/common/src/com/google/appinventor/common/youngandroid/package-info.java
.../google/appinventor/common/youngandroid/package-info.java
+0
-15
No files found.
appinventor/appengine/build.xml
View file @
f25c4117
...
...
@@ -148,8 +148,7 @@
</target>
<target
name=
"WarLibs"
description=
"Copy libs to build/war/WEB-INF/lib"
depends=
"init,MakeWarLibsDir,common_BlocksEditorHttpConstants,common_CommonUtils,common_CommonVersion,components_CommonConstants"
>
<copy
todir=
"${build.war.dir}/WEB-INF/lib"
file=
"${build.dir}/common/BlocksEditorHttpConstants.jar"
/>
depends=
"init,MakeWarLibsDir,common_CommonUtils,common_CommonVersion,components_CommonConstants"
>
<copy
todir=
"${build.war.dir}/WEB-INF/lib"
file=
"${build.dir}/common/CommonUtils.jar"
/>
<copy
todir=
"${build.war.dir}/WEB-INF/lib"
file=
"${build.dir}/common/CommonVersion.jar"
/>
<copy
todir=
"${build.war.dir}/WEB-INF/lib"
file=
"${build.dir}/components/CommonConstants.jar"
/>
...
...
@@ -410,7 +409,7 @@
===================================================================== -->
<target
name=
"AiClientLib"
description=
"App Inventor Client library - compile java source to bytecode"
depends=
"common_
BlocksEditorHttpConstants,common_
CommonUtils,common_CommonVersion,components_CommonConstants,components_JsonComponentDescription,components_ComponentTranslation"
>
depends=
"common_CommonUtils,common_CommonVersion,components_CommonConstants,components_JsonComponentDescription,components_ComponentTranslation"
>
<mkdir
dir=
"${build.war.dir}/WEB-INF/classes"
/>
<ai.javac
encoding=
"utf-8"
destdir=
"${build.war.dir}/WEB-INF/classes"
...
...
@@ -420,7 +419,6 @@
<include
name=
"${appinventor.pkg}/client/**/*.java"
/>
<include
name=
"${appinventor.pkg}/shared/**/*.java"
/>
<classpath>
<pathelement
location=
"${build.dir}/common/BlocksEditorHttpConstants.jar"
/>
<pathelement
location=
"${build.dir}/common/CommonUtils.jar"
/>
<pathelement
location=
"${build.dir}/common/CommonVersion.jar"
/>
<pathelement
location=
"${build.dir}/components/CommonConstants.jar"
/>
...
...
@@ -448,14 +446,13 @@
CheckYaClientApp - checks whether it is already up-to-date.
===================================================================== -->
<target
name=
"CheckYaClientApp"
depends=
"common_
BlocksEditorHttpConstants,common_
CommonUtils,common_CommonVersion,components_CommonConstants,AiClientLib,AiRebindLib,CopyToBuildWar"
>
depends=
"common_CommonUtils,common_CommonVersion,components_CommonConstants,AiClientLib,AiRebindLib,CopyToBuildWar"
>
<!-- If ode.nocache.js is up-to-date, set YaClientApp.uptodate to true.
Otherwise, set YaClientApp.uptodate to false -->
<uptodate
property=
"YaClientApp.uptodate"
targetfile=
"${build.war.dir}/ode/ode.nocache.js"
>
<srcfiles
dir=
"${build.war.dir}/WEB-INF/classes"
/>
<srcfiles
file=
"${local.build.dir}/AiRebindLib.jar"
/>
<srcfiles
file=
"${build.dir}/common/BlocksEditorHttpConstants-gwt.jar"
/>
<srcfiles
file=
"${build.dir}/common/CommonUtils-gwt.jar"
/>
<srcfiles
file=
"${build.dir}/common/CommonVersion-gwt.jar"
/>
<srcfiles
file=
"${build.dir}/components/CommonConstants-gwt.jar"
/>
...
...
@@ -464,7 +461,7 @@
<target
name=
"YaClientApp"
description=
"GWT compile to JavaScript"
depends=
"common_
BlocksEditorHttpConstants,common_
CommonUtils,common_CommonVersion,components_CommonConstants,AiClientLib,AiRebindLib,CheckYaClientApp"
depends=
"common_CommonUtils,common_CommonVersion,components_CommonConstants,AiClientLib,AiRebindLib,CheckYaClientApp"
unless=
"YaClientApp.uptodate"
>
<mkdir
dir=
"${build.extra.dir}"
/>
<java
failonerror=
"true"
fork=
"true"
classname=
"com.google.gwt.dev.Compiler"
>
...
...
@@ -473,7 +470,6 @@
<pathelement
location=
"${build.dir}/components/ComponentTranslation/src"
/>
<pathelement
location=
"${build.war.dir}/WEB-INF/classes"
/>
<pathelement
location=
"${local.build.dir}/AiRebindLib.jar"
/>
<pathelement
location=
"${build.dir}/common/BlocksEditorHttpConstants-gwt.jar"
/>
<pathelement
location=
"${build.dir}/common/CommonUtils-gwt.jar"
/>
<pathelement
location=
"${build.dir}/common/CommonVersion-gwt.jar"
/>
<pathelement
location=
"${build.dir}/components/CommonConstants-gwt.jar"
/>
...
...
appinventor/appengine/src/com/google/appinventor/YaClient.gwt.xml
View file @
f25c4117
...
...
@@ -27,7 +27,6 @@
<inherits
name=
"com.google.common.base.Base"
/>
<inherits
name=
"com.google.common.collect.Collect"
/>
<inherits
name=
"com.google.appinventor.components.CommonConstants"
/>
<inherits
name=
"com.google.appinventor.common.BlocksEditorHttpConstants"
/>
<inherits
name=
"com.google.appinventor.common.CommonUtils"
/>
<inherits
name=
"com.google.appinventor.common.CommonVersion"
/>
<inherits
name=
"com.google.common.annotations.Annotations"
/>
...
...
@@ -41,8 +40,6 @@
<servlet
path=
"/projects"
class=
"com.google.appinventor.server.ProjectServiceImpl"
/>
<servlet
path=
"/upload"
class=
"com.google.appinventor.server.UploadServlet"
/>
<servlet
path=
"/userinfo"
class=
"com.google.appinventor.server.UserInfoServiceImpl"
/>
<servlet
path=
"/webstartfile"
class=
"com.google.appinventor.server.WebStartFileServlet"
/>
<servlet
path=
"/webstartjnlp"
class=
"com.google.appinventor.server.WebStartJnlpServlet"
/>
<!-- srcs -->
<source
path=
""
includes=
"simple_components.json"
/>
...
...
appinventor/appengine/src/com/google/appinventor/server/util/ResourceUtil.java
deleted
100644 → 0
View file @
85c3dc36
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package
com.google.appinventor.server.util
;
import
com.google.appinventor.common.youngandroid.YaHttpServerConstants
;
import
com.google.common.io.Files
;
import
com.google.common.io.Resources
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.URL
;
/**
* Helper methods for resources.
*
* @author lizlooney@google.com (Liz Looney)
*/
public
final
class
ResourceUtil
{
// Jar file containing Codeblocks for Young Android
public
static
final
String
CODEBLOCKS_JAR
=
"BlocksEditor.jar"
;
// Main class for Codeblocks
public
static
final
String
CODEBLOCKS_MAIN
=
"com.google.appinventor.blockseditor.youngandroid.YaHttpServerMain"
;
// Apk file containing starter app
private
static
final
String
STARTER_APP_APK
=
YaHttpServerConstants
.
STARTER_PHONEAPP_NAME
+
".apk"
;
private
ResourceUtil
()
{
}
/**
* Returns a byte array containing the binary content of the signed
* codeblocks jar.
*/
public
static
byte
[]
downloadSignedCodeblocksJar
()
throws
IOException
{
// The codeblocks jar was signed at build time.
// We expect the jar file to be in our class directory
URL
url
=
ResourceUtil
.
class
.
getResource
(
CODEBLOCKS_JAR
);
return
Resources
.
toByteArray
(
url
);
}
/**
* Returns a byte array containing the binary content of the starter app apk.
*/
public
static
byte
[]
downloadStarterAppApk
()
throws
IOException
{
// We expect the start app apk file to be in our class directory
return
Resources
.
toByteArray
(
ResourceUtil
.
class
.
getResource
(
STARTER_APP_APK
));
}
}
appinventor/build-common.xml
View file @
f25c4117
...
...
@@ -318,17 +318,6 @@
target=
"CommonTranslations"
/>
</target>
<!-- ====================================================================
common_BlocksEditorHttpConstants builds:
- build/common/BlocksEditorHttpConstants.jar
- build/common/BlocksEditorHttpConstants-gwt.jar
==================================================================== -->
<target
name=
"common_BlocksEditorHttpConstants"
>
<ant
inheritAll=
"false"
useNativeBasedir=
"true"
dir=
"${appinventor.dir}/common"
target=
"BlocksEditorHttpConstants"
/>
</target>
<!-- ====================================================================
common_CommonUtils builds:
- build/common/CommonUtils.jar
...
...
appinventor/common/build.xml
View file @
f25c4117
...
...
@@ -13,7 +13,7 @@
</description>
<target
name=
"all"
depends=
"CommonUtils,CommonVersion,
BlocksEditorHttpConstants,
CommonTestUtils"
>
depends=
"CommonUtils,CommonVersion,CommonTestUtils"
>
</target>
<target
name=
"tests"
...
...
@@ -154,36 +154,6 @@
</target>
<!-- =====================================================================
BlocksEditorHttpConstants: library of constants for blocks editor
http server.
===================================================================== -->
<target
name=
"BlocksEditorHttpConstants"
description=
"Generate library of constants for blocks editor http server"
depends=
"init"
>
<property
name=
"BlocksEditorHttpConstants-class.dir"
location=
"${class.dir}/BlocksEditorHttpConstants"
/>
<mkdir
dir=
"${BlocksEditorHttpConstants-class.dir}"
/>
<ai.javac
destdir=
"${BlocksEditorHttpConstants-class.dir}"
>
<include
name=
"${common.pkg}/jsonp/JsonpConstants.java"
/>
<include
name=
"${common.pkg}/youngandroid/YaHttpServerConstants.java"
/>
</ai.javac>
<jar
destfile=
"${public.build.dir}/BlocksEditorHttpConstants.jar"
>
<fileset
dir=
"${BlocksEditorHttpConstants-class.dir}"
/>
</jar>
<jar
destfile=
"${public.build.dir}/BlocksEditorHttpConstants-gwt.jar"
>
<fileset
dir=
"${BlocksEditorHttpConstants-class.dir}"
/>
<fileset
dir=
"${src.dir}"
>
<include
name=
"${common.pkg}/jsonp/JsonpConstants.java"
/>
<include
name=
"${common.pkg}/youngandroid/YaHttpServerConstants.java"
/>
<include
name=
"${common.pkg}/BlocksEditorHttpConstants.gwt.xml"
/>
</fileset>
</jar>
</target>
<!-- =====================================================================
CommonTestUtils: library containing utility class for testing
===================================================================== -->
...
...
appinventor/common/src/com/google/appinventor/common/BlocksEditorHttpConstants.gwt.xml
deleted
100644 → 0
View file @
85c3dc36
<module>
<inherits
name=
"com.google.gwt.user.User"
/>
<source
path=
"jsonp"
/>
<source
path=
"youngandroid"
/>
</module>
appinventor/common/src/com/google/appinventor/common/youngandroid/YaHttpServerConstants.java
deleted
100644 → 0
View file @
85c3dc36
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package
com.google.appinventor.common.youngandroid
;
/**
* Constants related to the Young Android http server.
*
* @author sharon@google.com (Sharon Perl)
*/
public
class
YaHttpServerConstants
{
private
YaHttpServerConstants
()
{
}
// URI component used for saving the codeblocks HTTP port
public
static
final
String
CODEBLOCKS_SAVE_PORT
=
"codeblocks_saveport_"
;
// URI component used for downloading the starter apk that goes on the phone
public
static
final
String
STARTER_PHONEAPP_APK
=
"AppInventorPhoneApp_apk"
;
// URI component used for downloading the zipped asset files
public
static
final
String
ASSETS_ZIPFILE
=
"assets_zipfile"
;
// The returned asset zipfile will be "<project name>-assets.zip"
public
static
final
String
ASSET_ZIPFILE_SUFFIX
=
"-assets.zip"
;
// Base name for the YA starter application.
public
static
final
String
STARTER_PHONEAPP_NAME
=
"AppInventorPhoneApp"
;
// Filename used for saving the codeblocks connection info
public
static
final
String
CODEBLOCKS_INFO_FILE_PREFIX
=
"codeblocks_info_"
;
// Constants used in HTTP requests:
public
static
final
String
LOAD_FORM
=
"loadForm"
;
//async
public
static
final
String
RELOAD_PROPERTIES
=
"reloadProperties"
;
// async
public
static
final
String
SYNC_PROPERTY
=
"syncProperty"
;
// async
public
static
final
String
ADD_ASSET
=
"addAsset"
;
// async
public
static
final
String
SAVE_CODEBLOCKS_SOURCE
=
"saveBlk"
;
public
static
final
String
GENERATE_YAIL
=
"generateYail"
;
// async
public
static
final
String
CLEAR_CODEBLOCKS
=
"clearCodeblocks"
;
//async
public
static
final
String
IS_PHONE_CONNECTED
=
"isPhoneConnected"
;
// async
public
static
final
String
INSTALL_APPLICATION
=
"installApplication"
;
// async
// Constants used in HTTP request parameters:
// NOTE(lizlooney) - When adding new parameters here, make sure they don't collide with those
// defined in JsonpConstants.
public
static
final
String
FORM_PROPERTIES_PATH
=
"fp"
;
// LOAD_FORM
public
static
final
String
PROJECT_NAME
=
"n"
;
// LOAD_FORM
public
static
final
String
ASSET_PATH
=
"a"
;
// LOAD_FORM
public
static
final
String
COMPONENT_NAME
=
"c"
;
// SYNC_PROPERTY
public
static
final
String
PROPERTY_NAME
=
"p"
;
// SYNC_PROPERTY
public
static
final
String
COMPONENT_TYPE
=
"t"
;
// SYNC_PROPERTY
public
static
final
String
PROPERTY_VALUE
=
"v"
;
// SYNC_PROPERTY
public
static
final
String
APK_FILE_PATH
=
"afp"
;
// INSTALL_APPLICATION
public
static
final
String
APP_NAME
=
"an"
;
// INSTALL_APPLICATION
public
static
final
String
PACKAGE_NAME
=
"un"
;
// INSTALL_APPLICATION
}
appinventor/common/src/com/google/appinventor/common/youngandroid/package-info.java
deleted
100644 → 0
View file @
85c3dc36
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
/**
* Constants related to the local http server used for communications between the
* Designer and Blocks Editor. Clients include:
* <ul>
* <li> {@link com.google.appinventor.client.youngandroid}</li>
* <li> {@link com.google.appinventor.server.project.youngandroid#YoungAndroidWebStartSupport}</li>
* <li> {@link com.google.appinventor.server.util#ResourceUtil}</li>
* </ul>
*/
package
com.google.appinventor.common.youngandroid
;
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