Skip to content

Commit 41e812c

Browse files
committed
Merge pull request #332 from brunobowden/docs
Docs update: 0.4.0 version + plugin description
2 parents e2070c0 + fd940be commit 41e812c

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# J2ObjC Gradle Plugin
22

3-
This is the Gradle Plugin for [J2ObjC](https://github.com/google/j2objc), which is an open-source
4-
tool from Google that translates Java source code to Objective-C for the iOS (iPhone/iPad)
5-
platform. The plugin is not affiliated with Google but was developed by former Google Engineers
6-
and others. J2ObjC enables Java source to be part of an iOS application's build, as no editing of
7-
the generated files is necessary. The goal is to write an app's non-UI code (such as application
8-
logic and data models) in Java, which is then shared by web apps (using GWT), Android apps,
9-
and iOS apps.
3+
Gradle Plugin for [J2ObjC](https://github.com/google/j2objc),
4+
which is an open-source tool from Google that translates
5+
Java source code to Objective-C for the iOS (iPhone/iPad) platform. The plugin is
6+
not affiliated with Google but was developed by former Google Engineers and others.
7+
J2ObjC enables Java source to be part of an iOS application's build, no editing
8+
of the generated files is necessary. The goal is to write an app's non-UI code
9+
(such as application logic and data models) in Java, which is then shared by
10+
Android apps (natively Java), web apps (using GWT), and iOS apps (using J2ObjC).
1011

1112

1213
### Usage
@@ -23,28 +24,26 @@ Android application. This if beneficial for separation between the application m
2324
and user interface and a project which can easily be used server side as well.
2425

2526
The Android app, shared Java project and Xcode should be sibling directories, i.e children
26-
of the same root level folder. Suggested names are `android, shared & ios` respectivey.
27-
See the section below on [Folder Structure](#folder-structure).
27+
of the same root level folder. Suggested folder names are `'android', 'shared' and 'ios'`
28+
respectivey. See the section below on [Folder Structure](#folder-structure).
2829

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

3132
// File: shared/build.gradle
3233
plugins {
3334
id 'java'
34-
id 'com.github.j2objccontrib.j2objcgradle' version '0.3.0-alpha'
35+
id 'com.github.j2objccontrib.j2objcgradle' version '0.4.0-alpha'
3536
}
3637

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

42-
// Other Settings:
43-
// https://github.com/j2objc-contrib/j2objc-gradle/blob/master/src/main/groovy/com/github/j2objccontrib/j2objcgradle/J2objcConfig.groovy#L30
44-
4543
finalConfigure() // Must be last call to configuration
4644
}
4745

46+
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].
4847
Within the Android application's `android/build.gradle`, make it dependent on
4948
the `shared` project:
5049

@@ -70,8 +69,7 @@ directory. It is integrated with Gradle's Java build plugin and may be run as fo
7069

7170
./gradlew shared:build
7271

73-
To update an existing Xcode project to load the libraries and header files, use this
74-
additional command:
72+
To update the existing Xcode project to load the libraries and header files:
7573

7674
./gradlew shared:j2objcXcode
7775

build.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ version = '0.4.0-alpha'
3737
pluginBundle {
3838
website = 'https://www.github.com/j2objc-contrib/j2objc-gradle/'
3939
vcsUrl = 'https://github.com/j2objc-contrib/j2objc-gradle'
40-
description = 'Gradle Plugin for J2ObjC, which is an open-source tool from Google that translates ' +
41-
'Java source code to Objective-C for the iOS (iPhone/iPad) platform. The plugin is ' +
42-
'not affiliated with Google but was developed by former Google Engineers and others. ' +
43-
'J2ObjC enables Java source to be part of an iOS application\'s build, as no editing ' +
44-
'of the generated files is necessary. The goal is to write an app\'s non-UI code ' +
45-
'(such as application logic and data models) in Java, which is then shared by web ' +
46-
'apps (using GWT), Android apps, and iOS apps.'
40+
description =
41+
"Gradle Plugin for J2ObjC, which is an open-source tool from Google that translates " +
42+
"Java source code to Objective-C for the iOS (iPhone/iPad) platform. The plugin is " +
43+
"not affiliated with Google but was developed by former Google Engineers and others. " +
44+
"J2ObjC enables Java source to be part of an iOS application's build, no editing " +
45+
"of the generated files is necessary. The goal is to write an app's non-UI code " +
46+
"(such as application logic and data models) in Java, which is then shared by " +
47+
"Android apps, web apps (using GWT), and iOS apps (using J2ObjC)."
4748
tags = ['android', 'java', 'j2objc', 'ios', 'iphone', 'objective-c', 'xcode']
4849

4950
plugins {

0 commit comments

Comments
 (0)