├── .gitignore
├── .gitmodules
├── CONTRIBUTING.md
├── LICENSE
├── NOTICE
├── README.md
├── install-j2objc.sh
├── install.sh
├── libraryBuilds
├── .gitignore
├── com.google.code.gson-gson
│ ├── build.gradle
│ ├── com.google.code.gson-gson
│ │ └── build.gradle
│ ├── gradlew
│ ├── local.properties
│ └── settings.gradle
├── common
│ ├── build.gradle
│ └── prep-tests.sh
├── joda-time-joda-time
│ ├── build.gradle
│ ├── gradlew
│ ├── joda-time-joda-time
│ │ └── build.gradle
│ ├── local.properties
│ ├── org.joda-joda-convert
│ └── settings.gradle
├── org.apache.commons-commons-lang3
│ ├── build.gradle
│ ├── gradlew
│ ├── local.properties
│ ├── org.apache.commons-commons-lang3
│ │ └── build.gradle
│ └── settings.gradle
├── org.joda-joda-convert
│ ├── build.gradle
│ ├── gradlew
│ ├── local.properties
│ ├── org.joda-joda-convert
│ │ ├── build.gradle
│ │ └── prep.sh
│ └── settings.gradle
└── org.joda-joda-primitives
│ ├── build.gradle
│ ├── gradlew
│ ├── local.properties
│ ├── org.joda-joda-primitives
│ └── build.gradle
│ └── settings.gradle
├── run-all.sh
└── run-test.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | # Temp files
2 | *~
3 | .gradle
4 |
5 | # Build
6 | build/
7 |
8 | # Ignore Gradle GUI config
9 | gradle-app.setting
10 |
11 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
12 | !gradle-wrapper.jar
13 |
14 | # Don't save away IntelliJ config, except code-style which all commits must follow.
15 | **/.idea/
16 | !.idea/codeStyleSettings.xml
17 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "j2objc-gradle"]
2 | path = j2objc-gradle
3 | url = https://github.com/j2objc-contrib/j2objc-gradle.git
4 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Please keep in mind that your "Contribution(s)" are submitted under
2 | the [Apache 2.0 License](LICENSE).
3 |
4 | ### Team workflow
5 |
6 | 1. An issue is created describing the change required.
7 | Feature requests should be labeled 'enhancement' while bugs should be labeled 'bug'.
8 | Issues are optional for trivial fixes like typos.
9 | 2. An issue is assigned to the developer working on it. If the developer is
10 | not assignable due to GitHub.com permissions, add the label 'public-dev-assigned'.
11 | 3. The issue assignee creates a pull request (PR) with their commits.
12 | PRs are never optional, even for trivial fixes.
13 | 4. The PR is assigned to one of the project committers and code review/fixes ensue.
14 | The PR assignee's LGTM is sufficient and neccessary to merge the PR, however additional
15 | code review from anyone is welcome. The PR author should keep the PR in a state fit for submission
16 | (see [preparing-your-pull-request-for-submission](#preparing-your-pull-request-for-submission))
17 | through out this process. The PR assignee will also need you to follow the instructions in
18 | [Conditions for accepting pull requests](#conditions-for-accepting-pull-requests).
19 | 5. After LGTM from the PR assignee, a project committer merges the PR into master.
20 | If the PR author is a committer, they can merge the PR themselves as long as they
21 | have an LGTM from the PR assignee (which should be a different committer).
22 |
23 |
24 | ### Quick start
25 |
26 | 1. Fork it clicking on the top right "Fork" button
27 | 2. Create your feature branch
28 | `git checkout -b my-new-feature`
29 | 3. Commit your changes
30 | `git commit -am 'Add some feature'`
31 | 4. Push to the branch
32 | `git push origin my-new-feature`
33 | 5. Create a new Pull Request and send it for review
34 | 6. After the PR has been approved and is ready to submit see
35 | [preparing-your-pull-request-for-submission](#preparing-your-pull-request-for-submission).
36 |
37 |
38 | ### Conditions for accepting pull requests
39 | Please confirm that you can certify the following,
40 | then add the certification at the end of every commit message (with two newlines between
41 | the main content of your commit message and the notice), entering your own information
42 | and removing the <angled brackets>. If you can't certify the following, please
43 | do not submit a pull request.
44 |
45 | ```
46 | I, (, https://github.com/), certify that
47 | a) this Contribution is my original work, and
48 | b) I have the right to submit this Contribution under the Apache License,
49 | Version 2.0 (the "License") available at
50 | http://www.apache.org/licenses/LICENSE-2.0, and
51 | c) I am submitting this Contribution under the License.
52 | ```
53 |
54 | Note: This is not legal advice. Contributors, users, etc. must ensure their own level of comfort with
55 | contributions certified as described here, and should seek their own legal counsel as needed.
56 |
57 | Your Contribution (including the certification notice and other commit metadata)
58 | will be stored publicly within the history of the repository,
59 | and may be redistributed per the License.
60 |
61 | _If this is your first commit_, and you are not already mentioned in the NOTICE file,
62 | please add your name, GitHub username, and email, to the end of the
63 | 'Thanks:' list, formatted just like the entries already there:
64 |
65 | ```
66 | First Last @gitHubUserName
67 | ```
68 |
69 | This addition to the NOTICE file should be a part of that first commit.
70 |
71 | ### Updating j2objc-gradle
72 | The version of j2objc-gradle in this repo is not automatically kept up
73 | to date with HEAD of https://github.com/j2objc-contrib/j2objc-gradle.
74 |
75 | As a submodule, you can update j2objc-gradle by doing:
76 |
77 | ```shell
78 | # (start with a clean git working directory)
79 | # (from your local repo for this project)
80 | git checkout -b update-plugin
81 | pushd j2objc-gradle
82 | git pull
83 | popd
84 | git add .
85 | git commit -m 'Updating j2objc-gradle to HEAD'
86 | # (submit the update-plugin branch as a PR to the repo)
87 | ```
88 |
89 | Make sure this PR is seperate from any other work. If a library you want
90 | to build depends on the update, work in a new branch parented to the commit
91 | above.
92 |
93 | TODO: [Automate this](https://github.com/j2objc-contrib/j2objc-common-libs-e2e-test/issues/33)
94 |
95 | ### Library build verification
96 |
97 | On OS X we have system tests under the `libraryBuilds` directory. Each test directory
98 | has one root Gradle project (and zero or more subprojects), some or all of which apply the
99 | `j2objc-gradle` plugin. Locally you can run them as follows:
100 |
101 | ```sh
102 | pushd libraryBuilds
103 | ./prep.sh
104 | ./run-all.sh
105 | # Normal Gradle build results will be displayed for each test project.
106 | popd
107 | ```
108 |
109 | These system tests are also run as part of OS X continuous integration builds on Travis.
110 | You are not required to run the system tests locally before creating a PR (they can take
111 | time and processing power), however if the tests fail on Travis you will need to update
112 | the PR until they pass.
113 |
114 | ### Adding a new library
115 |
116 | When you add a new library to build, make sure it is referenced in run-all.sh (for
117 | human contributors) and in .travis.yml (for continuous builds). If your library has failures
118 | add the env row to the allow_failures section of .travis.yml and document the blockers.
119 |
120 | The structure for each library to test is as follows:
121 |
122 | ```
123 | libraryBuilds/
124 | - common/ - Existing directory with common build config
125 | - dependencyLib1/ - Existing root of a library that newLibrary depends on
126 | - dependencyLib1/ - Existing project for a library that newLibrary depends on
127 | - dependencyLib2/ - Ditto.
128 | - dependencyLib2/ - Ditto.
129 | - newLibrary/ - New directory for the root project
130 | - newLibrary/ - New directory for the library itself
131 | - build.gradle - Build file containing j2objcTranslation directive for newLibrary
132 | - dependencyLib1/ - Soft link to ../dependencyLib1/dependencyLib1/
133 | - dependencyLib2/ - Soft link to ../dependencyLib2/dependencyLib2/
134 | - build.gradle - Soft link to ../common/build.gradle, contains the preamble
135 | - gradlew - Soft link to ../../j2objc-gradle/gradlew
136 | - local.properties - Soft link to ../common/local.properties
137 | - settings.gradle - 'include' directive for newLibrary and libraries it depends on
138 | ```
139 |
140 | Every library newLibrary depends on must have its own similar structure as a top-level project,
141 | as illustrated by dependencyLib1 and 2. Note the two level directory structure above: even if
142 | your library has no dependencies, the build.gradle file for the library must lie 2 directories
143 | below libraryBuilds1/.
144 |
145 |
146 | ### Preparing your pull request for submission
147 | Say you have a pull request ready for submission into the main repository - it has
148 | been code reviewed and tested.
149 | It's convenient for project committers if you:
150 |
151 | 1. Condense branch history to 1 or a few commits that describe what you did. This
152 | eliminates internal code review fixes from being separate in history,
153 | like refactors, typos, etc.
154 | 2. Resolve merge conflicts with master. As the author of the PR, you're in the
155 | best position to resolve these correctly. Even if the merge is a fast-forward,
156 | doing the merge yourself allows you to test your code after incorporating others'
157 | changes.
158 |
159 | If you are new to github, here's an example workflow.
160 | We'll assume you are working from your local repository
161 | which is a clone of a fork of j2objc-contrib/j2objc-common-libs-e2e-test, that your feature
162 | branch is called 'patch-1' and that your pull request is number 46.
163 |
164 |
165 | ### Preparation
166 | ```sh
167 | # have a clean working directory and index
168 | # from the tip of your patch-1 branch: first save away your work
169 | git branch backup46
170 | ```
171 |
172 | Don't checkout or touch branch backup46 from here on out. If things
173 | go terribly wrong below, you can return to a state of LKG sanity with:
174 |
175 | 1. `git rebase --abort`
176 | 2. `git merge --abort`
177 | 3. `git checkout patch-1`
178 | 4. `git reset --hard backup46`
179 |
180 | This will return your patch-1 branch to the state before merging & rebasing
181 |
182 | First ensure you've setup your upstream remote as per
183 | https://help.github.com/articles/configuring-a-remote-for-a-fork/,
184 | then do https://help.github.com/articles/syncing-a-fork/.
185 | Your local master should now be equal to upstream/master.
186 | Push your local master to your origin remote:
187 | ```sh
188 | # While in your local master branch
189 | git push
190 | ```
191 |
192 |
193 | ### Rebasing and merging
194 | Now you can work on merging in master to your branch. We'll assume a simple
195 | branch history here, where patch-1 diverged from master and has never been
196 | merged back in yet. If you are unfamiliar
197 | with rebasing and merging, first read:
198 | https://robots.thoughtbot.com/git-interactive-rebase-squash-amend-rewriting-history
199 |
200 | The following steps will:
201 |
202 | 1. Update your repository with changes upstream.
203 | 2. Allow you to merge those change in to yours.
204 | 3. Allow you to squash all your commits into a single well-described commit.
205 |
206 | ```sh
207 | git checkout patch-1
208 | # condense this down to one commit to preserve proper project history
209 | git rebase -i master
210 | # within the rebase editor, replace the word 'pick' with 'fixup' on
211 | # every line except the very first one. On the first line, replace
212 | # 'pick' with 'reword'.
213 | # When you exit that editor, you should be given a chance to give
214 | # your entire PR a single detailed commit message.
215 | # resolve and finish the merge as usual.
216 | # The -f forces a push, since you will have rewritten part of your branch's
217 | # history.
218 | git push -f
219 | ```
220 |
221 | For guidance on doing the merge itself, see
222 | https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
223 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | j2objc-common-libs-e2e-test - https://github.com/j2objc-contrib/j2objc-common-libs-e2e-test
2 | a subproject of j2objc-gradle - Gradle plugin for j2objc (Java to Objective-C transpiler)
3 | https://github.com/j2objc-contrib/j2objc-gradle
4 |
5 | Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
6 |
7 | Main Contributors:
8 | Advay Mengle @advayDev1
9 | Bruno Bowden @brunobowden
10 |
11 | Licensed under the Apache License, Version 2.0 (the "License");
12 | you may not use this software except in compliance with the License.
13 | You may obtain a copy of the License at
14 |
15 | http://www.apache.org/licenses/LICENSE-2.0
16 |
17 | Unless required by applicable law or agreed to in writing, software
18 | distributed under the License is distributed on an "AS IS" BASIS,
19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | See the License for the specific language governing permissions and
21 | limitations under the License.
22 |
23 | This serves as the NOTICE under Section 4 d of the License.
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # j2objc-common-libs-e2e-test
2 | End-to-end tests for translating, compiling, and linking common Java libraries into Objective C
3 | using [J2ObjC](http://j2objc.org) and the [J2ObjC Gradle Plugin](https://github.com/j2objc-gradle).
4 |
5 | This is a subproject of [j2objc-gradle](https://github.com/j2objc-gradle)
6 | and [maintained by some of the same people](NOTICE). Like j2objc-gradle, this project is not affiliated
7 | with Google.
8 |
9 | The build status of various libraries can be found
10 | [here](https://travis-ci.org/j2objc-contrib/j2objc-common-libs-e2e-test).
11 | Each library is configured in [libraryBuilds](libraryBuilds).
12 |
13 | [](https://travis-ci.org/j2objc-contrib/j2objc-common-libs-e2e-test)
14 |
15 | **Goals**
16 | - Continuously verify that common open-source Java libraries can be translated and built correctly.
17 | - Provide a broader base of regression tests for both the J2ObjC and j2objc-gradle projects.
18 |
19 | **Non-goals**
20 | - Distribute pre-built Objective C versions of those libraries.
21 |
22 | For all support, questions, etc., please report issues directly to the j2objc-gradle
23 | and/or j2objc projects.
24 |
25 | **Licensing**
26 |
27 | This test suite is distributed under the Apache 2.0 license found in the [LICENSE](LICENSE) file.
28 | (Note: J2ObjC and the Java libraries that are downloaded and run through J2ObjC are distributed
29 | under their own licenses.)
30 |
--------------------------------------------------------------------------------
/install-j2objc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Must be run from the root directory
18 |
19 | # Fail if anything fails
20 | set -euv
21 |
22 | pushd libraryBuilds
23 |
24 | # Specific version can be configured from command line:
25 | # export J2OBJC_VERSION=X.Y.Z
26 | # Default is version number listed on following line:
27 | J2OBJC_VERSION=${J2OBJC_VERSION:=0.9.8.2.1}
28 |
29 | # -p flag avoid failure when directory already exists
30 | mkdir -p localJ2objcDist
31 | mkdir -p common
32 |
33 | pushd localJ2objcDist
34 |
35 | DIST_DIR=j2objc-$J2OBJC_VERSION
36 | DIST_FILE=$DIST_DIR.zip
37 |
38 | # For developer local testing, don't keep redownloading the zip file.
39 | if [ ! -e $DIST_FILE ]; then
40 | curl -L https://github.com/google/j2objc/releases/download/$J2OBJC_VERSION/j2objc-$J2OBJC_VERSION.zip > $DIST_FILE
41 | unzip $DIST_FILE
42 | echo j2objc.home=$PWD/$DIST_DIR > ../common/local.properties
43 | echo "libraryBuild/common/local.properties configured:"
44 | cat ../common/local.properties
45 | fi
46 |
47 | # pop localJ2objcDist
48 | popd
49 |
50 | # pop libraryBuilds
51 | popd
52 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Must be run from the root directory
18 |
19 | # Fail if anything fails
20 | set -euv
21 |
22 | export TERM=dumb
23 | env
24 | xcrun clang -v
25 |
26 | /usr/libexec/java_home -v 1.7 -F -V
27 | java -Xmx32m -version && javac -J-Xmx32m -version
28 |
29 | # In this repo, building of the j2objc-gradle plugin is just preperation.
30 | pushd j2objc-gradle
31 | ./gradlew wrapper
32 | ./gradlew dependencies
33 | ./gradlew build
34 | popd
35 |
36 | # Download and configures j2objc distribution.
37 | ./install-j2objc.sh
38 |
--------------------------------------------------------------------------------
/libraryBuilds/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore all the wrappers below.
2 | gradle/
3 | gradlew.bat
4 |
5 | # local.properties is retained in this directory because
6 | # they are soft links to common/local.properties (below).
7 | !local.properties
8 |
9 | # Generated by prep.sh
10 | common/local.properties
11 | localJ2objcDist/
12 |
13 | # Generated by prep-tests.sh
14 | test
15 | test-repo/
16 |
--------------------------------------------------------------------------------
/libraryBuilds/com.google.code.gson-gson/build.gradle:
--------------------------------------------------------------------------------
1 | ../common/build.gradle
--------------------------------------------------------------------------------
/libraryBuilds/com.google.code.gson-gson/com.google.code.gson-gson/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | dependencies {
18 | j2objcTranslation 'com.google.code.gson:gson:2.3.1:sources'
19 | }
20 |
21 | j2objcConfig {
22 | // Almost always there are no tests provided in an external source jar.
23 | testMinExpectedTests 0
24 | finalConfigure()
25 | }
26 |
--------------------------------------------------------------------------------
/libraryBuilds/com.google.code.gson-gson/gradlew:
--------------------------------------------------------------------------------
1 | ../../j2objc-gradle/gradlew
--------------------------------------------------------------------------------
/libraryBuilds/com.google.code.gson-gson/local.properties:
--------------------------------------------------------------------------------
1 | ../common/local.properties
--------------------------------------------------------------------------------
/libraryBuilds/com.google.code.gson-gson/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':com.google.code.gson-gson'
2 |
--------------------------------------------------------------------------------
/libraryBuilds/common/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | buildscript {
18 | repositories {
19 | jcenter()
20 | }
21 | dependencies {
22 | // This is the build output of the plugin itself.
23 | classpath fileTree(dir: '../../j2objc-gradle/build/libs', include: ['*.jar'])
24 | }
25 | }
26 |
27 | subprojects {
28 | apply plugin: 'java'
29 | apply plugin: 'com.github.j2objccontrib.j2objcgradle'
30 |
31 | j2objcConfig {
32 | // Include Java line numbers in Objective-C source files.
33 | translateArgs '-g'
34 | }
35 |
36 | repositories {
37 | jcenter()
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/libraryBuilds/common/prep-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | set -v
18 | rm -rf test-repo
19 | rm -rf src/test
20 | rm -rf src
21 |
22 | set -ev
23 | TAG=$1
24 | REPO=$2
25 | TEST_DIR_IN_REPO=$3
26 | git clone --depth 1 --branch $TAG $REPO test-repo
27 | mkdir src
28 | cp -R test-repo/$TEST_DIR_IN_REPO src/test
29 |
--------------------------------------------------------------------------------
/libraryBuilds/joda-time-joda-time/build.gradle:
--------------------------------------------------------------------------------
1 | ../common/build.gradle
--------------------------------------------------------------------------------
/libraryBuilds/joda-time-joda-time/gradlew:
--------------------------------------------------------------------------------
1 | ../../j2objc-gradle/gradlew
--------------------------------------------------------------------------------
/libraryBuilds/joda-time-joda-time/joda-time-joda-time/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | dependencies {
18 | j2objcTranslation 'joda-time:joda-time:2.8.2:sources'
19 | compile project(':org.joda-joda-convert')
20 | compile 'com.google.guava:guava:18.0'
21 | }
22 |
23 | j2objcConfig {
24 | autoConfigureDeps true
25 |
26 | // No tests in the sources.jar.
27 | testMinExpectedTests 0
28 | finalConfigure()
29 | }
30 |
--------------------------------------------------------------------------------
/libraryBuilds/joda-time-joda-time/local.properties:
--------------------------------------------------------------------------------
1 | ../common/local.properties
--------------------------------------------------------------------------------
/libraryBuilds/joda-time-joda-time/org.joda-joda-convert:
--------------------------------------------------------------------------------
1 | ../org.joda-joda-convert/org.joda-joda-convert/
--------------------------------------------------------------------------------
/libraryBuilds/joda-time-joda-time/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':org.joda-joda-convert', ':joda-time-joda-time'
2 |
--------------------------------------------------------------------------------
/libraryBuilds/org.apache.commons-commons-lang3/build.gradle:
--------------------------------------------------------------------------------
1 | ../common/build.gradle
--------------------------------------------------------------------------------
/libraryBuilds/org.apache.commons-commons-lang3/gradlew:
--------------------------------------------------------------------------------
1 | ../../j2objc-gradle/gradlew
--------------------------------------------------------------------------------
/libraryBuilds/org.apache.commons-commons-lang3/local.properties:
--------------------------------------------------------------------------------
1 | ../common/local.properties
--------------------------------------------------------------------------------
/libraryBuilds/org.apache.commons-commons-lang3/org.apache.commons-commons-lang3/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | dependencies {
18 | j2objcTranslation 'org.apache.commons:commons-lang3:3.4:sources'
19 | }
20 |
21 | j2objcConfig {
22 | // Blocked on https://github.com/j2objc-contrib/j2objc-gradle/issues/465
23 | // to support test-sources.jar.
24 | testMinExpectedTests 0
25 | finalConfigure()
26 | }
27 |
--------------------------------------------------------------------------------
/libraryBuilds/org.apache.commons-commons-lang3/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':org.apache.commons-commons-lang3'
2 |
3 |
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-convert/build.gradle:
--------------------------------------------------------------------------------
1 | ../common/build.gradle
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-convert/gradlew:
--------------------------------------------------------------------------------
1 | ../../j2objc-gradle/gradlew
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-convert/local.properties:
--------------------------------------------------------------------------------
1 | ../common/local.properties
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-convert/org.joda-joda-convert/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | dependencies {
18 | j2objcTranslation 'org.joda:joda-convert:1.8:sources'
19 | compile 'com.google.guava:guava:18.0'
20 | testCompile 'junit:junit:4.11'
21 | }
22 |
23 | j2objcConfig {
24 | testPattern {
25 | // Do not include subdirectories of convert. Their files prefixed with Test
26 | // are support classes, not tests.
27 | include '**/convert/Test*'
28 | // https://github.com/j2objc-contrib/j2objc-common-libs-e2e-test/issues/46
29 | exclude '**/TestGuavaTypeTokenStringConverter*'
30 | exclude '**/TestJDKStringConverters*'
31 | exclude '**/TestNumericObjectArrayStringConverterFactory*'
32 | exclude '**/TestStringConvert*'
33 | }
34 | autoConfigureDeps true
35 |
36 | finalConfigure()
37 | }
38 |
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-convert/org.joda-joda-convert/prep.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | ../../common/prep-tests.sh v1.8 https://github.com/JodaOrg/joda-convert src/test
18 |
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-convert/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':org.joda-joda-convert'
2 |
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-primitives/build.gradle:
--------------------------------------------------------------------------------
1 | ../common/build.gradle
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-primitives/gradlew:
--------------------------------------------------------------------------------
1 | ../../j2objc-gradle/gradlew
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-primitives/local.properties:
--------------------------------------------------------------------------------
1 | ../common/local.properties
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-primitives/org.joda-joda-primitives/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | dependencies {
18 | j2objcTranslation 'org.joda:joda-primitives:1.0:sources'
19 | }
20 |
21 | j2objcConfig {
22 | // sources.jar contains no tests.
23 | testMinExpectedTests 0
24 |
25 | finalConfigure()
26 | }
27 |
--------------------------------------------------------------------------------
/libraryBuilds/org.joda-joda-primitives/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':org.joda-joda-primitives'
2 |
--------------------------------------------------------------------------------
/run-all.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Must be run from the root directory
18 |
19 | # Fail if anything fails.
20 | set -euv
21 |
22 | ./run-test.sh libraryBuilds/com.google.code.gson-gson
23 | ./run-test.sh libraryBuilds/org.joda-joda-convert
24 | ./run-test.sh libraryBuilds/joda-time-joda-time
25 | ./run-test.sh libraryBuilds/org.joda-joda-primitives
26 | ./run-test.sh libraryBuilds/org.apache.commons-commons-lang3
27 |
--------------------------------------------------------------------------------
/run-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2015 the authors of j2objc-common-libs-e2e-test
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Must be run from the root directory
18 |
19 | # Fail if anything fails.
20 | set -euv
21 |
22 | if [[ "$PWD" =~ libraryBuilds ]]; then
23 | echo "Should be run from project root and not libraryBuilds directory"
24 | exit 1
25 | fi
26 |
27 | TEST_DIR=$1
28 | pushd $TEST_DIR
29 |
30 | echo Preparing test $TEST_DIR
31 |
32 | # Execute the prep.sh files within this project, if any.
33 | # These are often used to retrieve test sources for the libraries.
34 | # -L follows symbolic links correctly.
35 | find -L . -name prep.sh | while read PREP_SCRIPT_FILE
36 | do
37 | pushd `dirname $PREP_SCRIPT_FILE`
38 | sh prep.sh
39 | popd
40 | done
41 |
42 | echo Running test $TEST_DIR
43 | ./gradlew wrapper
44 | ./gradlew clean
45 | ./gradlew build --stacktrace
46 |
47 | # $TEST_DIR
48 | popd
49 |
--------------------------------------------------------------------------------