Comments (21)
+1. does gradle have a convention for flags like this for us to follow?
from j2objc-gradle.
There's already a flag there. For example, when you have no tests, it will automatically display a message indicating that no tests were run and asking if this was intended. If this is intentional, then you can set the testExecutedCheck false
flag. Were you looking for something else than this?
From line 821: https://github.com/brunobowden/j2objc-gradle/blob/master/j2objc.gradle#L800
// 0 tests => warn by default
if (project.j2objcConfig.testExecutedCheck) {
if (output.contains("OK (0 tests)")) {
def message =
"Zero unit tests were run. Tests are strongly encouraged with J2objc:\n" +
"\n" +
"To disable this check (which is against best practice):\n" +
"j2objcConfig {\n" +
" testExecutedCheck false\n" +
"}\n"
throw new InvalidUserDataException(message)
}
}
from j2objc-gradle.
@advayDev1 and @confile - is this setting enough or does it need more? If it's ok as is, then just close the issue.
from j2objc-gradle.
Not for my use case (which is issue #76 ). I don't want to 'not fail when 0 tests exist', I want to instead 'not run tests even if they exist'. As mentioned in #76, I want to just Translate and Copy. I don't need Compile and Test, since 1) I have my own build steps for that and 2) they don't validate the correctness of the configurations I want anyway. But for now in order to Copy to the output directory one must Compile and Test as well.
from j2objc-gradle.
Same hereI agree with @advayDev1:
I want to instead 'not run tests even if they exist
I want to just Translate
Well, with the Pod task we do not need the copy task anymore. I do not see why copy and then make the pod task.
from j2objc-gradle.
@confile, I don't think we should force everyone to use pods, and gradle itself provides an alternative, but that is a different discussion (see #76.) For people like me who want to minimize the amount of extra tools and third-party systems (ex. CocoaPods.org) they have to put into their trusted toolchain, having just the raw translated output is still needed.
from j2objc-gradle.
@advayDev1 I did not say we should force people to use pods. But, it is the easiest and fasted way to get j2objc running and properly configured. This should be promoted for beginners to lower the entrance barrier. Later if they understand the system they can use whatever they want.
from j2objc-gradle.
@confile, hmm, I guess 'easiest and fastest' is a matter of taste. If you remove j2objcCopy, you are forcing people to use pods, and Pods requires you to have CocoaPods installed. Having to modify one's toolchain is neither easy nor fast IMO since one has to review the resulting system for trust, stability, security, etc. (I was willing to use this plugin for example, since it was small enough that I reviewed all of its source.) Using j2obcCopy (and thus manually setting up xcode) or using gradle native introduces no additional dependencies (since the user is required to have xcode and gradle already to do ios development with our plugin).
I'm not at all opposed to having pods, or even recommending them as you said to new users as the fastest way to get E2E functionality. I just think we should provide options: raw copy, pods, or gradle for example. And the default should be raw since it has no dependencies and you can do whatever you want with the resulting translated source files.
from j2objc-gradle.
Whatever the topic of this discussion is to skip all tests with a flag.
I thing we should have a flag to skip.
from j2objc-gradle.
Yep agreed!
from j2objc-gradle.
This is very simple, just follow the convention of the cycleFinder flag that I added before. Please make the change send me a PR:
https://github.com/brunobowden/j2objc-gradle/blob/master/j2objc.gradle#L402
I can't see a convention around this for Gradle so I'd suggest the following:
- name the flag skipTranslate
- rename the cycleFinder to skipCycleFinder and negate the logic
- add more skipTask flags for other tasks as well
from j2objc-gradle.
Sorry, should be skipTest
from j2objc-gradle.
Here is my pull request: https://github.com/brunobowden/j2objc-gradle/pull/77
from j2objc-gradle.
@brunobowden I think you mean skipTest instead of skipTranslate.
from j2objc-gradle.
Yes I did. Also, I notice that the file has been using hte convention of
the task name and then the operation, e.g. translateFlags or
testExecutedCheck.
On Thu, May 21, 2015 at 7:16 AM Michael Gorski [email protected]
wrote:
@brunobowden https://github.com/brunobowden I think you mean skipTest
instead of skipTranslate.—
Reply to this email directly or view it on GitHub
https://github.com/brunobowden/j2objc-gradle/issues/73#issuecomment-104232957
.
from j2objc-gradle.
@advayDev1 @brunobowden If you both accept that this issue is solved then I close it. See: https://github.com/brunobowden/j2objc-gradle/pull/77
from j2objc-gradle.
@confile agreed. i think the convention is bug is resolved/closed once fix is merged. in fact, if you put the string "fixes #73" in your squashed commit, or if bruno does it in the merge commit, i think it autoresolves your bug.
from j2objc-gradle.
@advayDev1 fixes #73 or "fixes #73". With or without quotes?
from j2objc-gradle.
Without quotes:
On Thu, May 21, 2015 at 7:37 AM Michael Gorski [email protected]
wrote:
@advayDev1 https://github.com/advayDev1 fixes #73
https://github.com/brunobowden/j2objc-gradle/issues/73 or "fixes #73
https://github.com/brunobowden/j2objc-gradle/issues/73". With or
without quotes?—
Reply to this email directly or view it on GitHub
https://github.com/brunobowden/j2objc-gradle/issues/73#issuecomment-104236568
.
from j2objc-gradle.
https://help.github.com/articles/closing-issues-via-commit-messages/
On Thu, May 21, 2015 at 7:43 AM Bruno wrote:
Without quotes:
On Thu, May 21, 2015 at 7:37 AM Michael Gorski [email protected]
wrote:@advayDev1 https://github.com/advayDev1 fixes #73
https://github.com/brunobowden/j2objc-gradle/issues/73 or "fixes #73
https://github.com/brunobowden/j2objc-gradle/issues/73". With or
without quotes?—
Reply to this email directly or view it on GitHub
https://github.com/brunobowden/j2objc-gradle/issues/73#issuecomment-104236568
.
from j2objc-gradle.
Thank you!
from j2objc-gradle.
Related Issues (20)
- Possible to add *junit* to *spec.libraries* in generated podspec? HOT 1
- Setting xcodeTargetsManualConfig to false for a multi-module project fails HOT 2
- Translation fails to link dependencies HOT 1
- Possible to run an Android build whilst skipping all tasks of the J2ObjC Gradle plugin?
- Extracting resources from source jars HOT 1
- Does not convert app android to Ios HOT 5
- Stripping reflection applies to and breaks tests
- Need to add Guava headers to native compile header search path HOT 2
- Latest version of the Android Plugin for Gradle (2.0.0) requires Gradle 2.10 or later HOT 2
- Test source cannot be moved from default location
- Require way to set extended podspec values HOT 1
- I wrote a few gradle tasks to generate `name.framework`, without pods, >3 votes -> pull request HOT 7
- How to verify translated objective c unit tests ran successfully? HOT 1
- Regexp does not remove zeros at the beginning
- j2objcTestDebug is stuck when prefixes specified HOT 1
- Is this project still active? HOT 3
- Could not compile Source project with createIos_arm64
- How to install or implement in Android studio ??? HOT 1
- Test issue
- rat checks fail with basic $ ./gradlew check on mac HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from j2objc-gradle.