Dissolve gerrit-oauth top-level directory
Change-Id: Id680da2d63e2013c6e1e1a568a4088a15db5c9bd
diff --git a/gerrit-pgm/BUILD b/gerrit-pgm/BUILD
index 8d9b5f6..552cd26f 100644
--- a/gerrit-pgm/BUILD
+++ b/gerrit-pgm/BUILD
@@ -118,11 +118,11 @@
":util",
"//java/com/google/gerrit/elasticsearch",
"//java/com/google/gerrit/gpg",
+ "//java/com/google/gerrit/httpd/auth/oauth",
"//java/com/google/gerrit/httpd/auth/openid",
"//java/com/google/gerrit/server/cache/h2",
"//java/com/google/gerrit/index",
"//java/com/google/gerrit/lucene",
- "//gerrit-oauth:oauth",
"//lib:args4j",
"//lib:protobuf",
"//lib:servlet-api-3_1-without-neverlink",
diff --git a/gerrit-war/BUILD b/gerrit-war/BUILD
index a3bf40e..79636b1 100644
--- a/gerrit-war/BUILD
+++ b/gerrit-war/BUILD
@@ -5,7 +5,6 @@
srcs = glob(["src/main/java/**/*.java"]),
visibility = ["//visibility:public"],
deps = [
- "//gerrit-oauth:oauth",
"//gerrit-pgm:http",
"//gerrit-pgm:init",
"//gerrit-pgm:init-api",
@@ -17,6 +16,7 @@
"//java/com/google/gerrit/extensions:api",
"//java/com/google/gerrit/gpg",
"//java/com/google/gerrit/httpd",
+ "//java/com/google/gerrit/httpd/auth/oauth",
"//java/com/google/gerrit/httpd/auth/openid",
"//java/com/google/gerrit/lifecycle",
"//java/com/google/gerrit/lucene",
diff --git a/gerrit-oauth/BUILD b/java/com/google/gerrit/httpd/auth/oauth/BUILD
similarity index 80%
rename from gerrit-oauth/BUILD
rename to java/com/google/gerrit/httpd/auth/oauth/BUILD
index 61d2129..f305b15 100644
--- a/gerrit-oauth/BUILD
+++ b/java/com/google/gerrit/httpd/auth/oauth/BUILD
@@ -1,13 +1,8 @@
-SRCS = glob(
- ["src/main/java/**/*.java"],
-)
-
-RESOURCES = glob(["src/main/resources/**/*"])
-
java_library(
name = "oauth",
- srcs = SRCS,
- resources = RESOURCES,
+ srcs = glob(["**/*.java"]),
+ resource_strip_prefix = "resources",
+ resources = ["//resources/com/google/gerrit/httpd/auth/oauth"],
visibility = ["//visibility:public"],
deps = [
"//gerrit-server:server",
diff --git a/gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthLogoutServlet.java b/java/com/google/gerrit/httpd/auth/oauth/OAuthLogoutServlet.java
similarity index 100%
rename from gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthLogoutServlet.java
rename to java/com/google/gerrit/httpd/auth/oauth/OAuthLogoutServlet.java
diff --git a/gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthModule.java b/java/com/google/gerrit/httpd/auth/oauth/OAuthModule.java
similarity index 100%
rename from gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthModule.java
rename to java/com/google/gerrit/httpd/auth/oauth/OAuthModule.java
diff --git a/gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthSession.java b/java/com/google/gerrit/httpd/auth/oauth/OAuthSession.java
similarity index 100%
rename from gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthSession.java
rename to java/com/google/gerrit/httpd/auth/oauth/OAuthSession.java
diff --git a/gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java b/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java
similarity index 100%
rename from gerrit-oauth/src/main/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java
rename to java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java
diff --git a/resources/com/google/gerrit/httpd/auth/oauth/BUILD b/resources/com/google/gerrit/httpd/auth/oauth/BUILD
new file mode 100644
index 0000000..0721712
--- /dev/null
+++ b/resources/com/google/gerrit/httpd/auth/oauth/BUILD
@@ -0,0 +1,8 @@
+filegroup(
+ name = "oauth",
+ srcs = glob(
+ ["**/*"],
+ exclude = ["BUILD"],
+ ),
+ visibility = ["//visibility:public"],
+)
diff --git a/gerrit-oauth/src/main/resources/com/google/gerrit/httpd/auth/oauth/LoginForm.html b/resources/com/google/gerrit/httpd/auth/oauth/LoginForm.html
similarity index 100%
rename from gerrit-oauth/src/main/resources/com/google/gerrit/httpd/auth/oauth/LoginForm.html
rename to resources/com/google/gerrit/httpd/auth/oauth/LoginForm.html