GithubHelp home page GithubHelp logo

Comments (21)

advayDev1 avatar advayDev1 commented on July 21, 2024

+1. does gradle have a convention for flags like this for us to follow?

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

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.

brunobowden avatar brunobowden commented on July 21, 2024

@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.

advayDev1 avatar advayDev1 commented on July 21, 2024

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.

confile avatar confile commented on July 21, 2024

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.

advayDev1 avatar advayDev1 commented on July 21, 2024

@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.

confile avatar confile commented on July 21, 2024

@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.

advayDev1 avatar advayDev1 commented on July 21, 2024

@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.

confile avatar confile commented on July 21, 2024

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.

advayDev1 avatar advayDev1 commented on July 21, 2024

Yep agreed!

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

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:

  1. name the flag skipTranslate
  2. rename the cycleFinder to skipCycleFinder and negate the logic
  3. add more skipTask flags for other tasks as well

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

Sorry, should be skipTest

from j2objc-gradle.

confile avatar confile commented on July 21, 2024

Here is my pull request: https://github.com/brunobowden/j2objc-gradle/pull/77

from j2objc-gradle.

confile avatar confile commented on July 21, 2024

@brunobowden I think you mean skipTest instead of skipTranslate.

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

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.

confile avatar confile commented on July 21, 2024

@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.

advayDev1 avatar advayDev1 commented on July 21, 2024

@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.

confile avatar confile commented on July 21, 2024

@advayDev1 fixes #73 or "fixes #73". With or without quotes?

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

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.

brunobowden avatar brunobowden commented on July 21, 2024

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.

confile avatar confile commented on July 21, 2024

Thank you!

from j2objc-gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.