Skip to content

Commit

Permalink
Use Bazel to build GMavenToBazel
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Sep 19, 2018
1 parent dc905eb commit a56be81
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
7 changes: 7 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
licenses(["notice"]) # Apache 2.0


java_binary(
name = "gmaven_to_bazel",
srcs = ["java/com/google/gmaven/GMavenToBazel.java"],
main_class = "com.google.gmaven.GMavenToBazel",
)
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ You can see the full list of generated targets in

# Updating gmaven.bzl

To update `gmaven.bzl`, run the following command. It will take about 5 minutes.
To update `gmaven.bzl`, run the following command. It will take about 3 minutes.

```
rm gmaven.bzl && javac GMavenToBazel.java && java GMavenToBazel
bazel build //:gmaven_to_bazel_deploy.jar && java -jar bazel-bin/gmaven_to_bazel_deploy.jar
```


# Known issues

Currently, cross-repository dependency resolution is not supported. Some of the
Expand Down
10 changes: 8 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
android_sdk_repository(name = 'androidsdk')
local_repository(name = 'gmaven_rules', path = '.')
android_sdk_repository(
name = 'androidsdk',
)

local_repository(
name = 'gmaven_rules',
path = '.',
)
load('@gmaven_rules//:gmaven.bzl', 'gmaven_rules')
gmaven_rules()
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.import java.io.FileWriter;

package com.google.gmaven;

import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileWriter;
Expand Down

0 comments on commit a56be81

Please sign in to comment.