<commit_before>## Hey! We are looking for new developers to maintain the plugin.  Let us know on [j2objc-discuss](https://groups.google.com/forum/#!topic/j2objc-discuss/jQ_eyW9nxmQ) if you are interested.  Active development on this plugin is otherwise currently suspended.

# J2ObjC Gradle Plugin

The __J2ObjC Gradle plugin__ enables Java source to be part of an iOS application's build
so you can write an app's non-UI code (such as application logic and data models) in Java,
which is then shared by Android apps (natively Java) and iOS apps (using J2ObjC).

The plugin:
* Translates your Java source code to Objective-C for iOS (iPhone/iPad) using [__J2ObjC__](https://github.com/google/j2objc), an open-source tool from Google
* Builds Objective-C static libraries and headers ready-to-use in Xcode
* Runs translated versions of your JUnit tests to ensure your code works in Objective-C form
* Handles multiple Java projects, external Java libraries \[1\], and existing Objective-C code you'd like to link in
* Configures Xcode projects to use your translated libraries, using CocoaPods (optionally)
 
The plugin is not affiliated with Google but was developed by former Google Engineers and others.
Note that the plugin is currently in alpha; we may need to make breaking API changes
before the 1.0 release.

[![License](https://img.shields.io/badge/license-Apache%202.0%20License-blue.svg)](https://github.com/j2objc-contrib/j2objc-gradle/blob/master/LICENSE)
[![OSX and Linux Build Status](https://img.shields.io/travis/j2objc-contrib/j2objc-gradle/master.svg?label=mac and linux build)](https://travis-ci.org/j2objc-contrib/j2objc-gradle)
[![Windows Build Status](https://img.shields.io/appveyor/ci/madvayApiAccess/j2objc-gradle/master.svg?label=windows build)](https://ci.appveyor.com/project/madvayApiAccess/j2objc-gradle/branch/master)

Home Page: https://github.com/j2objc-contrib/j2objc-gradle

### Quick Start Guide

You should start with a clean Java only project without any Android dependencies.
It is suggested that the project is named `shared`. It must be buildable using the standard
[Gradle Java plugin](https://docs.gradle.org/current/userguide/java_plugin.html).
Starting with an empty project allows you to gradually shift over code from an existing
Android application. This is beneficial for separation between the application model
and user interface. It also allows the shared project to be easily used server-side as well.

The Android app, shared Java project and Xcode project should be sibling directories, i.e children
of the same root level folder. Suggested folder names are `'android', 'shared' and 'ios'`
respectively. See the FAQ section on [recommended folder structure](FAQ.md#what-is-the-recommended-folder-structure-for-my-app).

Configure `shared/build.gradle` for your Java-only project:

```gradle
// File: shared/build.gradle
plugins {
    id 'java'
    id 'com.github.j2objccontrib.j2objcgradle' version '0.5.0-alpha'
}<commit_msg>Build links fixed by replacing spaces with "%20"<commit_after>## Hey! We are looking for new developers to maintain the plugin.  Let us know on [j2objc-discuss](https://groups.google.com/forum/#!topic/j2objc-discuss/jQ_eyW9nxmQ) if you are interested.  Active development on this plugin is otherwise currently suspended.

# J2ObjC Gradle Plugin

The __J2ObjC Gradle plugin__ enables Java source to be part of an iOS application's build
so you can write an app's non-UI code (such as application logic and data models) in Java,
which is then shared by Android apps (natively Java) and iOS apps (using J2ObjC).

The plugin:
* Translates your Java source code to Objective-C for iOS (iPhone/iPad) using [__J2ObjC__](https://github.com/google/j2objc), an open-source tool from Google
* Builds Objective-C static libraries and headers ready-to-use in Xcode
* Runs translated versions of your JUnit tests to ensure your code works in Objective-C form
* Handles multiple Java projects, external Java libraries \[1\], and existing Objective-C code you'd like to link in
* Configures Xcode projects to use your translated libraries, using CocoaPods (optionally)
 
The plugin is not affiliated with Google but was developed by former Google Engineers and others.
Note that the plugin is currently in alpha; we may need to make breaking API changes
before the 1.0 release.

[![License](https://img.shields.io/badge/license-Apache%202.0%20License-blue.svg)](https://github.com/j2objc-contrib/j2objc-gradle/blob/master/LICENSE)
[![OSX and Linux Build Status](https://img.shields.io/travis/j2objc-contrib/j2objc-gradle/master.svg?label=mac%20and%20linux%20build)](https://travis-ci.org/j2objc-contrib/j2objc-gradle)
[![Windows Build Status](https://img.shields.io/appveyor/ci/madvayApiAccess/j2objc-gradle/master.svg?label=windows%20build)](https://ci.appveyor.com/project/madvayApiAccess/j2objc-gradle/branch/master)

Home Page: https://github.com/j2objc-contrib/j2objc-gradle

### Quick Start Guide

You should start with a clean Java only project without any Android dependencies.
It is suggested that the project is named `shared`. It must be buildable using the standard
[Gradle Java plugin](https://docs.gradle.org/current/userguide/java_plugin.html).
Starting with an empty project allows you to gradually shift over code from an existing
Android application. This is beneficial for separation between the application model
and user interface. It also allows the shared project to be easily used server-side as well.

The Android app, shared Java project and Xcode project should be sibling directories, i.e children
of the same root level folder. Suggested folder names are `'android', 'shared' and 'ios'`
respectively. See the FAQ section on [recommended folder structure](FAQ.md#what-is-the-recommended-folder-structure-for-my-app).

Configure `shared/build.gradle` for your Java-only project:

```gradle
// File: shared/build.gradle
plugins {
    id 'java'
    id 'com.github.j2objccontrib.j2objcgradle' version '0.5.0-alpha'
}
{'fraction_non_alphanumeric': 0.09075770191507078, 'fraction_numerical': 0.012323064113238967, 'mean_word_length': 4.923076923076923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5743156', 'n_tokens_mistral': 1824, 'n_tokens_neox': 1730, 'n_words': 669}