dweiss commented on a change in pull request #519:
URL: https://github.com/apache/solr/pull/519#discussion_r783121786



##########
File path: dev-tools/scripts/addContrib.py
##########
@@ -0,0 +1,170 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+import sys
+sys.path.append(os.path.dirname(__file__))
+from scriptutil import *
+
+import argparse
+import re
+from textwrap import dedent
+
+def update_build(file_path, search_re, replace_line):
+  print('adding contrib into %s' % file_path)
+  matcher = re.compile(search_re)
+
+  def edit(buffer, match, line):
+    if replace_line in line:
+      return None
+    match = matcher.search(line)
+    if match is not None:
+      buffer.append(replace_line)
+    buffer.append(line)
+    return match is not None
+
+  changed = update_file(file_path, matcher, edit)
+  print('done' if changed else 'uptodate')
+
+
+def read_config():
+  parser = argparse.ArgumentParser(description='Scaffold new contrib module')
+  parser.add_argument("name")
+  parser.add_argument("full_name")
+  parser.add_argument("description")
+  newconf = parser.parse_args()
+  return newconf
+
+
+def get_readme_skel(conrib_name):
+  return dedent('''Apache Solr %s
+=====================================
+
+Introduction
+------------
+TBD
+
+Getting Started
+---------------
+TBD
+''' % conrib_name)
+
+def get_license_header():
+  return '''/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+'''
+
+def get_build_gradle(description):
+  return dedent('''apply plugin: 'java-library'
+
+description = '%s'
+
+configurations.all {

Review comment:
       The least you can do is apply this closure not to all configurations but 
only to those that originate from the java plugin - 
   
https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_configurations_graph
   
   Configurations are a very broad concept and are used all around the place 
(including plugins) - excluding arbitrary dependencies from everything is 
asking for trouble.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to