From 6635b737d135455484401f8d2f19ab4c981bbf93 Mon Sep 17 00:00:00 2001
From: akwizgran <michael@briarproject.org>
Date: Wed, 29 Mar 2023 11:01:08 +0100
Subject: [PATCH] Add Maven publishing plugin.

---
 gradle.properties                      | 38 ++++++++++++--------------
 onionwrapper-android/build.gradle      |  1 +
 onionwrapper-android/gradle.properties |  1 +
 onionwrapper-java/build.gradle         |  2 ++
 onionwrapper-java/gradle.properties    |  1 +
 5 files changed, 23 insertions(+), 20 deletions(-)
 create mode 100644 onionwrapper-android/gradle.properties
 create mode 100644 onionwrapper-java/gradle.properties

diff --git a/gradle.properties b/gradle.properties
index 3e927b1..b9ba6bf 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,21 +1,19 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app's APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
+org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
 android.useAndroidX=true
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
+android.nonTransitiveRClass=true
+GROUP=org.briarproject
+# POM_ARTIFACT_ID is set in the module's gradle.properties
+VERSION_NAME=0.0.1
+POM_NAME=Onion Wrapper
+POM_DESCRIPTION=A Java library providing a wrapper for running a Tor client.
+POM_INCEPTION_YEAR=2023
+POM_URL=https://code.briarproject.org/briar/onionwrapper
+POM_LICENSE_NAME=GPL-v3.0
+POM_LICENSE_URL=http://www.gnu.org/licenses/gpl-3.0.txt
+POM_LICENSE_DIST=repo
+POM_SCM_URL=https://code.briarproject.org/briar/onionwrapper
+POM_SCM_CONNECTION=scm:git:git://code.briarproject.org:briar/onionwrapper.git
+POM_SCM_DEV_CONNECTION=scm:git:ssh://git@code.briarproject.org:briar/onionwrapper.git
+POM_DEVELOPER_ID=akwizgran
+POM_DEVELOPER_NAME=Michael Rogers
+POM_DEVELOPER_URL=https://github.com/akwizgran/
diff --git a/onionwrapper-android/build.gradle b/onionwrapper-android/build.gradle
index 23b9fd0..c7f7978 100644
--- a/onionwrapper-android/build.gradle
+++ b/onionwrapper-android/build.gradle
@@ -1,5 +1,6 @@
 plugins {
     id 'com.android.library'
+    id 'com.vanniktech.maven.publish' version '0.18.0'
 }
 
 android {
diff --git a/onionwrapper-android/gradle.properties b/onionwrapper-android/gradle.properties
new file mode 100644
index 0000000..2eacda6
--- /dev/null
+++ b/onionwrapper-android/gradle.properties
@@ -0,0 +1 @@
+POM_ARTIFACT_ID=onionwrapper-android
diff --git a/onionwrapper-java/build.gradle b/onionwrapper-java/build.gradle
index f8e7667..3bba0f2 100644
--- a/onionwrapper-java/build.gradle
+++ b/onionwrapper-java/build.gradle
@@ -1,5 +1,6 @@
 plugins {
     id 'java-library'
+    id 'com.vanniktech.maven.publish' version '0.18.0'
 }
 
 java {
@@ -19,3 +20,4 @@ dependencies {
     testImplementation 'org.briarproject:obfs4proxy-linux:0.0.14-tor2'
     testImplementation 'org.briarproject:snowflake-linux:2.5.1'
 }
+
diff --git a/onionwrapper-java/gradle.properties b/onionwrapper-java/gradle.properties
new file mode 100644
index 0000000..52db0f5
--- /dev/null
+++ b/onionwrapper-java/gradle.properties
@@ -0,0 +1 @@
+POM_ARTIFACT_ID=onionwrapper-java
-- 
GitLab