Skip to content

Commit 4983412

Browse files
committed
Merge pull request #329 from brunobowden/update
j2objc => J2ObjC for user facing messages and docs
2 parents 2724407 + e950e6f commit 4983412

File tree

7 files changed

+30
-27
lines changed

7 files changed

+30
-27
lines changed

FAQ.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You have to first create the [Gradle wrapper](https://docs.gradle.org/current/us
1414
Go to your project folder and do ``gradle wrapper``. Refresh your Eclipse project.
1515

1616

17-
### How do I properly pass multiple arguments to j2objc?
17+
### How do I properly pass multiple arguments to J2ObjC?
1818

1919
Make sure your arguments are separate strings, not a single space-concatenated string.
2020

@@ -118,11 +118,11 @@ disable the `j2objcTest` task, do the following:
118118
}
119119

120120

121-
### How do I setup multiple related j2objc or native projects?
121+
### How do I setup multiple related J2ObjC or native projects?
122122

123123
You can express three kinds of dependencies within j2objcConfig:
124124

125-
1. The common case is that Java and j2objc Project B depends on Java and j2objc Project A,
125+
1. The common case is that Java and j2objc Project B depends on Java and J2ObjC Project A,
126126
and you need the Project B J2ObjC generated library to depend on the Project A J2ObjC
127127
generated library. In this case add to B.gradle:
128128

@@ -170,8 +170,8 @@ Objects that are part of a memory cycle on iOS won't be deleted as it doesn't su
170170
garbage collection.
171171

172172
The basic setup will implicitly check for 40 memory cycles - this is the expected number
173-
of erroneous matches with `jre_emul` library for j2objc version 0.9.6.1. This may cause
174-
issues if this number changes with future versions of j2objc libraries.
173+
of erroneous matches with `jre_emul` library for J2ObjC version 0.9.6.1. This may cause
174+
issues if this number changes with future versions of J2ObjC libraries.
175175

176176
j2objcCycleFinder {
177177
enabled = true
@@ -186,7 +186,7 @@ This uses a specially annotated version of the `jre_emul` source that marks all
186186
erroneously matched cycles such that they can be ignored. It requires downloading
187187
and building the J2ObjC source:
188188

189-
1. Download the j2objc source to a directory (hereafter J2OJBC_REPO):
189+
1. Download the J2ObjC source to a directory (hereafter J2OJBC_REPO):
190190

191191
https://github.com/google/j2objc
192192

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
# j2objc-gradle
2-
Gradle Plugin for [J2ObjC](https://github.com/google/j2objc), which is an open-source tool
3-
from Google that translates Java source code to Objective-C for the iOS (iPhone/iPad) platform.
4-
The plugin is not affiliated with Google but was developed by former Google Engineers and others.
5-
J2ObjC enables Java source to be part of an iOS application's build, as no editing of the
6-
generated files is necessary. The goal is to write an app's non-UI code (such as application
1+
# J2ObjC Gradle Plugin
2+
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
78
logic and data models) in Java, which is then shared by web apps (using GWT), Android apps,
89
and iOS apps.
910

1011

1112
### Usage
13+
1214
At HEAD, this plugin is in a state of significant flux as we refactor it into a first-class
1315
Gradle plugin for our beta. You may wish to wait for the beta release as we may make backwards
1416
incompatible changes before that point.
@@ -109,7 +111,7 @@ may want to disable the release build temporarily by adding to your `local.prope
109111

110112
j2objc.release.enabled=false
111113

112-
This should cut the j2objc build time up to 50%. You can also do this for `j2objc.debug.enabled`.
114+
This should cut the J2ObjC build time up to 50%. You can also do this for `j2objc.debug.enabled`.
113115

114116

115117
### FAQ

src/main/groovy/com/github/j2objccontrib/j2objcgradle/J2objcConfig.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,9 @@ class J2objcConfig {
312312
project.evaluationDependsOn beforeProject.path
313313

314314
if (!beforeProject.plugins.hasPlugin(J2objcPlugin)) {
315-
String message = "$beforeProject does not use the j2objc plugin.\n" +
315+
String message = "$beforeProject does not use the J2ObjC Gradle Plugin.\n" +
316316
"dependsOnJ2objcLib can be used only with another project that\n" +
317-
"itself uses the j2objc plugin."
317+
"itself uses the J2ObjC Gradle Plugin."
318318
throw new InvalidUserDataException(message)
319319
}
320320

src/main/groovy/com/github/j2objccontrib/j2objcgradle/J2objcPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class J2objcPlugin implements Plugin<Project> {
9595
tasks.create(name: 'j2objcTranslate', type: TranslateTask,
9696
dependsOn: 'j2objcCycleFinder') {
9797
group 'build'
98-
description "Translates all the java source files in to Objective-C using j2objc"
98+
description "Translates all the java source files in to Objective-C using 'j2objc'"
9999
additionalSrcFiles = files(
100100
fileTree(dir: "build/source/apt",
101101
include: "**/*.java")
@@ -127,7 +127,7 @@ class J2objcPlugin implements Plugin<Project> {
127127
tasks.create(name: 'j2objcTest', type: DefaultTask,
128128
dependsOn: ['j2objcTestDebug', 'j2objcTestRelease']) {
129129
group 'build'
130-
description "Marker task for all test tasks that take part in regular j2objc builds"
130+
description "Marker task for all test tasks that take part in regular J2ObjC builds"
131131
}
132132
// 'check' task is added by 'java' plugin, it depends on 'test' and
133133
// all the other verification tasks, now including 'j2objcTest'.

src/main/groovy/com/github/j2objccontrib/j2objcgradle/tasks/AssembleSourceTask.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class AssembleSourceTask extends DefaultTask {
6666
// Warn if deleting non-generated objc files from destDir
6767
nonObjcDestFiles.each { File file ->
6868
String message =
69-
"Unexpected files in $name - this folder should contain ONLY j2objc\n" +
70-
"generated files Objective-C. The folder contents are deleted to remove\n" +
69+
"Unexpected files in $name - this folder should contain ONLY J2ObjC\n" +
70+
"generated Objective-C files. The folder contents are deleted to remove\n" +
7171
"files that are nolonger generated. Please check the directory and remove\n" +
7272
"any files that don't end with Objective-C extensions '.h' and '.m'.\n" +
7373
"$name: ${destDir.path}\n" +

src/main/groovy/com/github/j2objccontrib/j2objcgradle/tasks/TestTask.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class TestTask extends DefaultTask {
136136
} catch (Exception exception) {
137137
String message =
138138
"The j2objcTest task failed. Given that the java plugin 'test' task\n" +
139-
"completed successfully, this is an error specific to the j2objc build.\n" +
139+
"completed successfully, this is an error specific to the J2ObjC Gradle\n" +
140+
"Plugin build.\n" +
140141
"\n" +
141142
"1) Check BOTH 'Standard Output' and 'Error Output' above for problems.\n" +
142143
"\n" +

src/main/groovy/com/github/j2objccontrib/j2objcgradle/tasks/Utils.groovy

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class Utils {
5555
static void throwIfNoJavaPlugin(Project proj) {
5656
if (!proj.plugins.hasPlugin('java')) {
5757
String message =
58-
"j2objc plugin didn't find the 'java' plugin in the '${proj.name}' project.\n" +
59-
"This is a requirement for using j2objc. Please see usage information at:\n" +
58+
"J2ObjC Gradle Plugin: missing 'java' plugin for '${proj.name}' project.\n" +
59+
"This is a requirement for using J2ObjC. Please see usage information at:\n" +
6060
"https://github.com/j2objc-contrib/j2objc-gradle/#usage"
6161
throw new InvalidUserDataException(message)
6262
}
@@ -96,7 +96,7 @@ class Utils {
9696
propKey.substring(PROPERTY_KEY_PREFIX.length(), propKey.length())
9797
if (!(withoutPrefix in PROPERTIES_VALID_KEYS)) {
9898
throw new InvalidUserDataException(
99-
"Invalid j2objc property: $propKey\n" +
99+
"Invalid J2ObjC Gradle Plugin property: $propKey\n" +
100100
"From local.properties: $localPropertiesFile.absolutePath\n" +
101101
"Valid Keys: $PROPERTIES_VALID_KEYS")
102102
}
@@ -117,19 +117,19 @@ class Utils {
117117
}
118118
if (result == null) {
119119
String message =
120-
"j2objc home not set, this should be configured either:\n" +
120+
"J2ObjC Home not set, this should be configured either:\n" +
121121
"1) in a 'local.properties' file in the project root directory as:\n" +
122-
" j2objc.home=/PATH/TO/J2OBJC/DISTRIBUTION\n" +
122+
" j2objc.home=/LOCAL_J2OBJC_PATH\n" +
123123
"2) as the J2OBJC_HOME system environment variable\n" +
124124
"\n" +
125125
"If both are configured the value in the properties file will be used.\n" +
126126
"\n" +
127-
"It must be the path of the unzipped j2objc distribution. Download releases here:\n" +
127+
"It must be the path of the unzipped J2ObjC distribution. Download releases here:\n" +
128128
"https://github.com/google/j2objc/releases"
129129
throw new InvalidUserDataException(message)
130130
}
131131
if (!proj.file(result).exists()) {
132-
String message = "j2objc directory not found, expected location: ${result}"
132+
String message = "J2OjcC Home directory not found, expected location: ${result}"
133133
throw new InvalidUserDataException(message)
134134
}
135135
// Trailing slashes cause problems with string concatenation logic.

0 commit comments

Comments
 (0)