From c4b64b3be3dc3748b7267a0f7a9ee86656b0a1a0 Mon Sep 17 00:00:00 2001 From: Advay Mengle Date: Sat, 24 Oct 2015 20:23:08 -0700 Subject: [PATCH 1/5] FAQ for 0.5.0-alpha --- FAQ.md | 127 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 39 deletions(-) diff --git a/FAQ.md b/FAQ.md index 2cfe176b..316b3eab 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,6 +1,10 @@ # FAQ (for contributors, see [CONTRIBUTING.md](CONTRIBUTING.md)) +This FAQ only illustrates the most common ways to customize the J2ObjC Gradle Plugin. See +[J2objcConfig.groovy](https://github.com/j2objc-contrib/j2objc-gradle/blob/master/src/main/groovy/com/github/j2objccontrib/j2objcgradle/J2objcConfig.groovy) +for comprehensive documentation of all options. + __Table of Contents__ - [Start here for debugging (aka it's not working; aka don't panic)](#start-here-for-debugging-aka-its-not-working-aka-dont-panic) -- [How do I develop with Xcode?](#how-do-i-develop-with-xcode) +- [How do I develop with tasde?](#how-do-i-develop-with-tasde) - [How can I speed up my build?](#how-can-i-speed-up-my-build) - [What libraries are linked by default?](#what-libraries-are-linked-by-default) - [How do I setup dependencies with J2ObjC?](#how-do-i-setup-dependencies-with-j2objc) @@ -31,7 +31,7 @@ Paste the results below, replacing existing contents. - [Why is my clean build failing?](#why-is-my-clean-build-failing) - [How do I include Java files from additional source directories?](#how-do-i-include-java-files-from-additional-source-directories) - [How do I develop with Swift?](#how-do-i-develop-with-swift) -- [How do I solve 'File not found' import error in Xcode?](#how-do-i-solve-file-not-found-import-error-in-xcode) +- [How do I solve 'File not found' import error in tasde?](#how-do-i-solve-file-not-found-import-error-in-tasde) - [How do I work with Package Prefixes?](#how-do-i-work-with-package-prefixes) - [How do I enable ARC for my translated Objective-C classes?](#how-do-i-enable-arc-for-my-translated-objective-c-classes) - [How do I call finalConfigure()?](#how-do-i-call-finalconfigure) @@ -49,7 +49,7 @@ Paste the results below, replacing existing contents. Some common misconfigurations can cause numerous Gradle errors. -1. First make sure you have a supported version of j2objc and Xcode +1. First make sure you have a supported version of j2objc and tasde (see [README.md](README.md) for our current supported versions) installed locally, and that your J2OBJC_HOME property is set correctly to the distribution directory of j2objc. This _is not_ the source repository root for j2objc. The distribution @@ -207,7 +207,7 @@ The main tasks for the plugin are: Running the `build` task from the Gradle Java plugin will automatically run the `j2objcBuild` task and all the previous tasks (which it depends on). The `j2objcXcode` task will disable itself -automatically if no xcode +automatically if no `xcodeProjectDir` is specified. Note that you can use the Gradle shorthand of `$ gradlew jA` to do the `j2objcAssemble` task. @@ -311,9 +311,9 @@ j2objcConfig { } ``` -If you'd like to preserve your folder hierarchy, you can alternatively change your +If you'd like to preserve your folder hierarchy, you can instead change your [USER_HEADER_SEARCH_PATHS](https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW21) -setting in your Xcode projects to include `shared/build/j2objcOutputs/src/main/objc`. +setting in your Xcode projects to include the `shared/build/j2objcOutputs/src/main/objc` folder. Example error: @@ -352,7 +352,7 @@ This will map packages such as com.example.dirandcom.example.dir.subdir both to ``` com.example.dir.*: Ceds -```` +``` ### How do I enable ARC for my translated Objective-C classes? @@ -413,12 +413,13 @@ disable the `j2objcTest` task, do the following: ```gradle // File: shared/build.gradle -j2objcTest { - enabled = false -} j2objcConfig { ... } + +j2objcTest { + enabled = false +} ``` @@ -479,7 +480,7 @@ For more details: ### How do I develop on Windows or Linux? Windows and Linux support is limited to the `j2objcCycleFinder` and `j2objcTranslate` tasks. -Mac OS X is required for the j2objcAssemble, j2objcTest and j2objcXcode tasks +Mac OS X is required for the j2objcAssemble, j2objcTest and j2objctasde tasks (see [task descriptions](README.md#tasks)) This matches the [J2ObjC Requirements](http://j2objc.org/#requirements). From 4ef448bd081a86f9e72c0226c1f37c5abf9b9d03 Mon Sep 17 00:00:00 2001 From: Advay Mengle Date: Sat, 24 Oct 2015 23:14:19 -0700 Subject: [PATCH 5/5] FAQ feedback --- FAQ.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/FAQ.md b/FAQ.md index c5c5b648..43f4fa37 100644 --- a/FAQ.md +++ b/FAQ.md @@ -19,7 +19,7 @@ and execute: Paste the results below, replacing existing contents. --> - [Start here for debugging (aka it's not working; aka don't panic)](#start-here-for-debugging-aka-its-not-working-aka-dont-panic) -- [How do I develop with tasde?](#how-do-i-develop-with-tasde) +- [How do I develop with Xcode?](#how-do-i-develop-with-xcode) - [How can I speed up my build?](#how-can-i-speed-up-my-build) - [What libraries are linked by default?](#what-libraries-are-linked-by-default) - [How do I setup dependencies with J2ObjC?](#how-do-i-setup-dependencies-with-j2objc) @@ -31,7 +31,7 @@ Paste the results below, replacing existing contents. - [Why is my clean build failing?](#why-is-my-clean-build-failing) - [How do I include Java files from additional source directories?](#how-do-i-include-java-files-from-additional-source-directories) - [How do I develop with Swift?](#how-do-i-develop-with-swift) -- [How do I solve 'File not found' import error in tasde?](#how-do-i-solve-file-not-found-import-error-in-tasde) +- [How do I solve 'File not found' import error in Xcode?](#how-do-i-solve-file-not-found-import-error-in-xcode) - [How do I work with Package Prefixes?](#how-do-i-work-with-package-prefixes) - [How do I enable ARC for my translated Objective-C classes?](#how-do-i-enable-arc-for-my-translated-objective-c-classes) - [How do I call finalConfigure()?](#how-do-i-call-finalconfigure) @@ -49,7 +49,7 @@ Paste the results below, replacing existing contents. Some common misconfigurations can cause numerous Gradle errors. -1. First make sure you have a supported version of j2objc and tasde +1. First make sure you have a supported version of j2objc and Xcode (see [README.md](README.md) for our current supported versions) installed locally, and that your J2OBJC_HOME property is set correctly to the distribution directory of j2objc. This _is not_ the source repository root for j2objc. The distribution @@ -80,7 +80,8 @@ Now try building again. ### How do I develop with Xcode? The J2ObjC Gradle Plugin configures your Xcode project with [CocoaPods](https://cocoapods.org/). -To take advantage of this, specify an `xcodeProjectDir` in your `j2objcConfig` per the Quick Start Guide. +To take advantage of this, specify the directory that contains `PROJECT.xcodeproj` as +the `xcodeProjectDir` in your `j2objcConfig` per the [Quick Start Guide](README.md#quick-start-guide). After running `j2objcXcode`, open the `.xcworkspace` file in Xcode. If the `.xcodeproj` file is opened in Xcode then CocoaPods will fail. This will appear as an Xcode build time error: @@ -344,14 +345,14 @@ j2objcConfig { // File: resources/prefixes.properties // Storing at this location allows Class.forName(javaName) to work for mapped class. com.example.dir: Ced -com.example.dir.subdir: Ceds +com.example.dir.subdir: Ced ``` -As of J2ObjC verion 0.9.8 you can also use wildcards in your prefixes file. -This will map packages such as com.example.dirandcom.example.dir.subdir both to Ceds. +You can also use wildcards in your prefixes file. +This will map packages such as com.example.dir and com.example.dir.subdir both to Ced. ``` -com.example.dir.*: Ceds +com.example.dir.*: Ced ``` ### How do I enable ARC for my translated Objective-C classes? @@ -480,7 +481,7 @@ For more details: ### How do I develop on Windows or Linux? Windows and Linux support is limited to the `j2objcCycleFinder` and `j2objcTranslate` tasks. -Mac OS X is required for the j2objcAssemble, j2objcTest and j2objctasde tasks +Mac OS X is required for the j2objcAssemble, j2objcTest and j2objcXcode tasks (see [task descriptions](README.md#tasks)) This matches the [J2ObjC Requirements](http://j2objc.org/#requirements).