Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [TIMOB-24470] Android: Fails to build modules that contain additi… #8875

Merged
merged 1 commit into from Mar 10, 2017

Conversation

sgtcoolguy
Copy link
Contributor

…onal java files inside plugins folder or test folders not intended to be in distributed module

JIRA: https://jira.appcelerator.org/browse/TIMOB-24470

This blocks usage of "appc ti build" to build our hyperloop.next module/plugin (for android)

…onal java files inside plugins folder or test folders not intended to be in distributed module
@sgtcoolguy sgtcoolguy added this to the 7.0.0 milestone Mar 9, 2017
@hansemannn hansemannn modified the milestones: 6.1.0, 7.0.0 Mar 10, 2017
Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: PASS
FT: PASS

👍

@sgtcoolguy
Copy link
Contributor Author

@longton95 So the change here is that when we run appc ti build --build-only on an android native module, we used to scan the entire project for .java as a last compilation pass. Now we only scan src/**/.java and build/gen/**/*.java to build up that listing (which gets written as java-sources.txt file)

Building hyperloop.next/android was able to reproduce this issue because I have java files in a test-src folder, and in the plugins folder. You could generate a native android module project and just add some folder like "tests" and place a java source file there and ensure it no longer gets included in the list of files to compile.

@longton95
Copy link
Contributor

longton95 commented Mar 10, 2017

FR passed.

Tested with a blank module and added test-src, plugins and stuff containing blank .java and tests from from the hyperloop.next files, .java file are not added to distributed module if they are not in src/**/.java and build/gen/**/*.java.

Thanks @sgtcoolguy

sources.txt

"/Users/Josh/apps/TIMOB-24470/android/src/com/appc/TIMOB24470/ExampleProxy.java"
"/Users/Josh/apps/TIMOB-24470/android/src/com/appc/TIMOB24470/TIMOB24470Module.java"
"/Users/Josh/apps/TIMOB-24470/android/build/generated/java/com/appc/TIMOB24470/TIMOB24470Bootstrap.java"

Test module tree

├── Resources
│   └── README.md
├── build.properties
├── build.xml
├── java-sources.txt
├── lib
│   └── README
├── libs
│   ├── armeabi-v7a
│   │   └── libcom.appc.TIMOB24470.so
│   └── x86
│       └── libcom.appc.TIMOB24470.so
├── manifest
├── platform
│   └── README.md
├── plugins
│   ├── 4.java
│   ├── 5.java
│   └── 6.java
├── src
│   └── com
│       └── appc
│           └── TIMOB24470
│               ├── ExampleProxy.java
│               └── TIMOB24470Module.java
├── stuff
│   └── stuff.java
├── test-src
│   ├── 1.java
│   ├── 2.java
│   └── 3.java
└── timodule.xml

ENV

SDK Version : Local 6.1.0, 6.0.3
Mac OS Version : 10.12.3
Appc CLI : 6.1.0
Appc NPM : 4.2.9-1
Node : v4.6.0

@longton95 longton95 merged commit 1cadb4d into tidev:master Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants