<commit_before># J2ObjC Gradle Plugin

Gradle Plugin for [J2ObjC](https://github.com/google/j2objc),
which is an open-source tool from Google that translates
Java source code to Objective-C for the iOS (iPhone/iPad) platform. The plugin is
not affiliated with Google but was developed by former Google Engineers and others.
J2ObjC enables Java source to be part of an iOS application's build, no editing
of the generated files is necessary. The goal is to 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), web apps (using GWT), and iOS apps (using J2ObjC).

[![Build Status](https://travis-ci.org/j2objc-contrib/j2objc-gradle.svg)](https://travis-ci.org/j2objc-contrib/j2objc-gradle)

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

### Usage

At HEAD, this plugin is in a state of flux as we refactor it into a first-class
Gradle plugin for our beta. You may wish to wait for the beta release as we may make
backwards incompatible changes before that point.

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 as 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 should be sibling directories, i.e children
of the same root level folder. Suggested folder names are `'android', 'shared' and 'ios'`
respectively. See the section below on [Folder Structure](#folder-structure).

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

```gradle
// File: shared/build.gradle
plugins {
    id 'java'
    id 'com.github.j2objccontrib.j2objcgradle' version '0.4.2-alpha'
}

// Plugin settings:
j2objcConfig {
    xcodeProjectDir '../ios'  // Xcode workspace directory (suggested directory name)
    xcodeTarget 'IOS-APP'     // iOS app target name (replace with existing app name)

    finalConfigure()          // Must be last call to configuration
}
```

Info on additional `j2objcConfig` settings are in [J2objcConfig.groovy](https://github.com/j2objc-contrib/j2objc-gradle/blob/master/src/main/groovy/com/github/j2objccontrib/j2objcgradle/J2objcConfig.groovy#L30).

Within the Android application's `android/build.gradle`, make it dependent on the `shared` project:

```gradle
// File: android/build.gradle
dependencies {
    compile project(':shared')
}
```


### Minimum Requirements

Gradle 2.4 is required for the compilation support within Gradle. The other necessities
are the [J2objc Requirements](http://j2objc.org/#requirements).
<commit_msg>README: reduce flux comment<commit_after># J2ObjC Gradle Plugin

Gradle Plugin for [J2ObjC](https://github.com/google/j2objc),
which is an open-source tool from Google that translates
Java source code to Objective-C for the iOS (iPhone/iPad) platform. The plugin is
not affiliated with Google but was developed by former Google Engineers and others.
J2ObjC enables Java source to be part of an iOS application's build, no editing
of the generated files is necessary. The goal is to 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), web apps (using GWT), and iOS apps (using J2ObjC).

[![Build Status](https://travis-ci.org/j2objc-contrib/j2objc-gradle.svg)](https://travis-ci.org/j2objc-contrib/j2objc-gradle)

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

### Usage

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 as 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 should be sibling directories, i.e children
of the same root level folder. Suggested folder names are `'android', 'shared' and 'ios'`
respectively. See the section below on [Folder Structure](#folder-structure).

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

```gradle
// File: shared/build.gradle
plugins {
    id 'java'
    id 'com.github.j2objccontrib.j2objcgradle' version '0.4.2-alpha'
}

// Plugin settings:
j2objcConfig {
    xcodeProjectDir '../ios'  // Xcode workspace directory (suggested directory name)
    xcodeTarget 'IOS-APP'     // iOS app target name (replace with existing app name)

    finalConfigure()          // Must be last call to configuration
}
```

Info on additional `j2objcConfig` settings are in [J2objcConfig.groovy](https://github.com/j2objc-contrib/j2objc-gradle/blob/master/src/main/groovy/com/github/j2objccontrib/j2objcgradle/J2objcConfig.groovy#L30).

Within the Android application's `android/build.gradle`, make it dependent on the `shared` project:

```gradle
// File: android/build.gradle
dependencies {
    compile project(':shared')
}
```

Note that the plugin is currently in alpha; we may need to make breaking API changes
before the 1.0 release.

### Minimum Requirements

Gradle 2.4 is required for the compilation support within Gradle. The other necessities
are the [J2objc Requirements](http://j2objc.org/#requirements).

{'fraction_non_alphanumeric': 0.08756323042037328, 'fraction_numerical': 0.010814582243153672, 'mean_word_length': 4.4557564224548045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, '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': '1901240', 'n_tokens_mistral': 1716, 'n_tokens_neox': 1625, 'n_words': 678}