From e4433a7ab147f0fe0650a8a50d30ef8ca857cee5 Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Tue, 5 Jan 2021 23:34:53 +0530 Subject: [PATCH 01/12] core maven to maven-publish --- core/build.gradle | 117 +++++++++++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 43 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 3bbae4b1..8000d7b9 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,46 +1,64 @@ +import org.apache.tools.ant.Project import java.nio.file.Files -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; apply plugin: 'aar' -apply plugin: 'maven' +apply plugin: 'maven-publish' dependencies { implementation name: "android" - implementationAar "androidx.legacy:legacy-support-v4:${v4legacyVersion}" - implementationAar "com.google.android.support:wearable:${wearVersion}" + implementationAar "com.google.android.support:wearable:${wearVersion}" +} + +task sourceJar(type: Jar) { + from sourceSets.main.allJava + archiveClassifier = "sources" } -task createPom { - pom { - project { - groupId "org.p5android" - artifactId "processing-core" - version "${modeVersion}" - packaging "jar" - licenses { - license { - name "GNU Lesser General Public License, version 2.1" - url "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt" - distribution "repo" - } - } - dependencies { - dependency { - groupId "androidx.legacy" - artifactId "legacy-support-v4" - version "${v4legacyVersion}" - scope "implementation" - } - dependency { - groupId "com.google.android.support" - artifactId "wearable" - version "${wearVersion}" - scope "implementation" - } - } +publishing { + publications { + corePublication(MavenPublication) { + from components.java + artifact sourceJar + pom { + groupId = "org.p5android" + artifactId = "processing-core" + version = "${modeVersion}" + packaging = "jar" + // description = "Processing Android Core" + // url = "http://www.example.com/project" + licenses { + license { + name = "GNU Lesser General Public License, version 2.1" + url = "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt" + distribution = "repo" + } + } + } + pom.withXml { // Only one dependency is added under dependancies node + asNode().remove(asNode().get("dependencies")) //removing dependencies node + // inserting the dependencies node + def dependenciesNode = asNode().appendNode('dependencies') + // start adding dependency nodes inside dependencies node + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', 'androidx.legacy') + dependencyNode.appendNode('artifactId', 'legacy-support-v4') + dependencyNode.appendNode('version', '1.0.0') + dependencyNode.appendNode('scope', 'implementation') + + def dependencyNode2 = dependenciesNode.appendNode('dependency') + dependencyNode2.appendNode('groupId', 'com.google.android.support') + dependencyNode2.appendNode('artifactId', 'wearable') + dependencyNode2.appendNode('version', '2.8.1') + dependencyNode2.appendNode('scope', 'implementation') + + def dependencyNode3 = dependenciesNode.appendNode('dependency') + dependencyNode3.appendNode('artifactId', 'android') + dependencyNode3.appendNode('scope', 'runtime') + } } - }.writeTo("dist/processing-core-${modeVersion}.pom") + } } sourceSets { @@ -80,25 +98,38 @@ clean.doFirst { } compileJava.doFirst { - String[] deps = ["wearable.jar"] + String[] deps = ["wearable.jar"] for (String fn : deps) { Files.copy(file("${rootDir}/build/libs/" + fn).toPath(), - file("${rootDir}/mode/mode/" + fn).toPath(), REPLACE_EXISTING) + file("${rootDir}/mode/mode/" + fn).toPath(), REPLACE_EXISTING) } } build.doLast { - // Copying core jar as zip inside the mode folder + // If xml doesn't exist + def pomfile = file("${buildDir}/publications/corePublication/pom-default.xml") + if (!pomfile.exists()) { + println("***************************************************************************************\n" + + "* *\n" + + "* File not found: root/core/build/publications/corePublication/pom-default.xml *\n" + + "* First execute the following command to generate the file: *\n" + + "* gradle generatePomFileForcorePublicationPublication *\n" + + "* *\n" + + "***************************************************************************************" + ) + } + // // Copying core jar as zip inside the mode folder Files.copy(file("${buildDir}/libs/core.jar").toPath(), - file("${coreZipPath}").toPath(), REPLACE_EXISTING) - - // Copying the files for release on JCentral + file("${coreZipPath}").toPath(), REPLACE_EXISTING) + // // Copying the files for release on JCentral File distFolder = file("dist") distFolder.mkdirs() Files.copy(file("${buildDir}/libs/core.jar").toPath(), - file("dist/processing-core-${modeVersion}.jar").toPath(), REPLACE_EXISTING) + file("dist/processing-core-${modeVersion}.jar").toPath(), REPLACE_EXISTING) Files.copy(file("${buildDir}/libs/core-sources.jar").toPath(), - file("dist/processing-core-${modeVersion}-sources.jar").toPath(), REPLACE_EXISTING) + file("dist/processing-core-${modeVersion}-sources.jar").toPath(), REPLACE_EXISTING) Files.copy(file("${buildDir}/libs/core.jar.MD5").toPath(), - file("dist/processing-core-${modeVersion}.jar.md5").toPath(), REPLACE_EXISTING) -} \ No newline at end of file + file("dist/processing-core-${modeVersion}.jar.md5").toPath(), REPLACE_EXISTING) + Files.copy(file("${buildDir}/publications/corePublication/pom-default.xml").toPath(), + file("dist/processing-core-${modeVersion}.pom").toPath(), REPLACE_EXISTING) +} From 6273182bd5b3b7a9d6c650088dbc3d101e217fca Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Tue, 5 Jan 2021 23:36:50 +0530 Subject: [PATCH 02/12] AR maven to maven-publish --- mode/libraries/ar/build.gradle | 105 ++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 42 deletions(-) diff --git a/mode/libraries/ar/build.gradle b/mode/libraries/ar/build.gradle index 9616907c..45ee913e 100644 --- a/mode/libraries/ar/build.gradle +++ b/mode/libraries/ar/build.gradle @@ -2,47 +2,60 @@ import java.nio.file.Files import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; apply plugin: 'aar' -apply plugin: 'maven' +apply plugin: 'maven-publish' dependencies { compileOnly name: "android" - compileOnly "org.p5android:processing-core:${modeVersion}" - implementationAar "com.google.ar:core:${garVersion}" } -task createPom { - pom { - project { - groupId "org.p5android" - artifactId "processing-ar" - version "${arLibVersion}" - packaging "jar" - licenses { - license { - name "GNU Lesser General Public License, version 2.1" - url "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt" - distribution "repo" - } - } - dependencies { - dependency { - groupId "org.p5android" - artifactId "processing-core" - version "${modeVersion}" - scope "implementation" - } +task sourceJar(type: Jar) { + from sourceSets.main.allJava + archiveClassifier = "sources" +} + +publishing { + publications { + arPublication(MavenPublication) { + from components.java + artifact sourceJar + pom { + groupId = "org.p5android" + artifactId = "processing-ar" + version = "${arLibVersion}" + packaging = "jar" + // description = "Processing Android Core" + // url = "http://www.example.com/project" + licenses { + license { + name = "GNU Lesser General Public License, version 2.1" + url = "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt" + distribution = "repo" + } + } + } + + pom.withXml { + // inserting the dependencies node + def dependenciesNode = asNode().appendNode('dependencies') + // start adding dependency nodes inside dependencies node + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', 'org.p5android') + dependencyNode.appendNode('artifactId', 'processing-core') + dependencyNode.appendNode('version', '4.2.0') + dependencyNode.appendNode('scope', 'implementation') + + def dependencyNode2 = dependenciesNode.appendNode('dependency') + dependencyNode2.appendNode('groupId', 'com.google.ar') + dependencyNode2.appendNode('artifactId', 'core') + dependencyNode2.appendNode('version', '1.22.0') + dependencyNode2.appendNode('scope', 'implementation') + } + - dependency { - groupId "com.google.ar" - artifactId "core" - version "${garVersion}" - scope "implementation" - } - } } - }.writeTo("dist/processing-ar-${arLibVersion}.pom") + } } sourceSets { @@ -56,11 +69,6 @@ sourceSets { } } -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource -} - // Does not work because of Processing-specific tags in source code, such as @webref task javadocJar(type: Jar, dependsOn: javadoc) { classifier = "javadoc" @@ -69,7 +77,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) { artifacts { // archives javadocJar - archives sourcesJar + archives sourceJar } jar.doLast { task -> @@ -92,13 +100,24 @@ compileJava.doFirst { } build.doLast { + // If xml doesn't exist + def pomfile = file("${buildDir}/publications/arPublication/pom-default.xml") + if (!pomfile.exists()) { + println("**********************************************************************************************\n" + + "* *\n" + + "* File not found: root/mode/libraries/ar/build/publications/arPublication/pom-default.xml *\n" + + "* First execute the following command to generate the file: *\n" + + "* gradle generatePomFileForarPublicationPublication *\n" + + "* *\n" + + "**********************************************************************************************" + ) + } // Copying ar jar to library folder File arJar = file("library/ar.jar") arJar.mkdirs(); Files.copy(file("$buildDir/libs/ar.jar").toPath(), - arJar.toPath(), REPLACE_EXISTING); - - // // Copying the files for release on JCentral + arJar.toPath(), REPLACE_EXISTING); + // Copying the files for release on JCentral File distFolder = file("dist"); distFolder.mkdirs(); Files.copy(file("$buildDir/libs/ar.jar").toPath(), @@ -107,4 +126,6 @@ build.doLast { file("dist/processing-ar-${arLibVersion}-sources.jar").toPath(), REPLACE_EXISTING); Files.copy(file("$buildDir/libs/ar.jar.MD5").toPath(), file("dist/processing-ar-${arLibVersion}.jar.md5").toPath(), REPLACE_EXISTING); -} \ No newline at end of file + Files.copy(file("${buildDir}/publications/arPublication/pom-default.xml").toPath(), + file("dist/processing-ar-${arLibVersion}.pom").toPath(), REPLACE_EXISTING) +} From 82f915b8eeb7889d8ae5b65a36f3002c27db39e3 Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Tue, 5 Jan 2021 23:38:18 +0530 Subject: [PATCH 03/12] VR maven to maven-publish --- mode/libraries/vr/build.gradle | 78 +++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 7 deletions(-) diff --git a/mode/libraries/vr/build.gradle b/mode/libraries/vr/build.gradle index c086225c..e23da730 100644 --- a/mode/libraries/vr/build.gradle +++ b/mode/libraries/vr/build.gradle @@ -2,7 +2,7 @@ import java.nio.file.Files import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; apply plugin: 'aar' -apply plugin: 'maven' +apply plugin: 'maven-publish' dependencies { compileOnly name: "android" @@ -13,6 +13,7 @@ dependencies { implementationAar "com.google.vr:sdk-base:${gvrVersion}" } +/* task createPom { pom { project { @@ -52,6 +53,59 @@ task createPom { }.writeTo("dist/processing-vr-${vrLibVersion}.pom") } + + */ + +task sourceJar(type: Jar, dependsOn: classes) { + classifier = "sources" + from sourceSets.main.allSource +} + +publishing { + publications { + vrPublication(MavenPublication) { + from components.java + artifact sourceJar + pom { + groupId = "org.p5android" + artifactId = "processing-vr" + version = "${vrLibVersion}" + packaging = "jar" + licenses { + license { + name = "GNU Lesser General Public License, version 2.1" + url = "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt" + distribution = "repo" + } + } + } + + pom.withXml { + // inserting the dependencies node + def dependenciesNode = asNode().appendNode('dependencies') + // start adding dependency nodes inside dependencies node + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', 'org.p5android') + dependencyNode.appendNode('artifactId', 'processing-core') + dependencyNode.appendNode('version', '4.2.0') + dependencyNode.appendNode('scope', 'implementation') + + def dependencyNode2 = dependenciesNode.appendNode('dependency') + dependencyNode2.appendNode('groupId', 'com.google.vr') + dependencyNode2.appendNode('artifactId', 'sdk-base') + dependencyNode2.appendNode('version', '1.180.0') + dependencyNode2.appendNode('scope', 'implementation') + + def dependencyNode3 = dependenciesNode.appendNode('dependency') + dependencyNode3.appendNode('groupId', 'com.google.vr') + dependencyNode3.appendNode('artifactId', 'sdk-audio') + dependencyNode3.appendNode('version', '1.180.0') + dependencyNode3.appendNode('scope', 'implementation') + } + } + } +} + sourceSets { main { java { @@ -60,10 +114,6 @@ sourceSets { } } -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource -} // Does not work because of Processing-specific tags in source code, such as @webref task javadocJar(type: Jar, dependsOn: javadoc) { @@ -73,7 +123,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) { artifacts { // archives javadocJar - archives sourcesJar + archives sourceJar } jar.doLast { task -> @@ -100,6 +150,18 @@ compileJava.doFirst { build.doLast { + // If xml doesn't exist + def pomfile = file("${buildDir}/publications/corePublication/pom-default.xml") + if (!pomfile.exists()) { + println("************************************************************************************************\n" + + "* *\n" + + "* File not found: root/mode/libraries/vr/build/publications/corePublication/pom-default.xml *\n" + + "* First execute the following command to generate the file: *\n" + + "* gradle generatePomFileForvrPublicationPublication *\n" + + "* *\n" + + "************************************************************************************************" + ) + } // // Copying vr jar to library folder File vrJar = file("library/vr.jar") vrJar.mkdirs(); @@ -115,4 +177,6 @@ build.doLast { file("dist/processing-vr-${vrLibVersion}-sources.jar").toPath(), REPLACE_EXISTING); Files.copy(file("$buildDir/libs/vr.jar.MD5").toPath(), file("dist/processing-vr-${vrLibVersion}.jar.md5").toPath(), REPLACE_EXISTING); -} \ No newline at end of file + Files.copy(file("$buildDir/publications/corePublication/pom-default.xml").toPath(), + file("dist/processing-vr-${vrLibVersion}.pom").toPath(), REPLACE_EXISTING); +} From cd56030e7bb9acfda06174ef73fb6254bda51de0 Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Fri, 8 Jan 2021 16:04:04 +0530 Subject: [PATCH 04/12] correcting path from core to vr in vr build.gradle --- mode/libraries/vr/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/libraries/vr/build.gradle b/mode/libraries/vr/build.gradle index e23da730..041e605e 100644 --- a/mode/libraries/vr/build.gradle +++ b/mode/libraries/vr/build.gradle @@ -1,5 +1,5 @@ import java.nio.file.Files -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING apply plugin: 'aar' apply plugin: 'maven-publish' @@ -177,6 +177,6 @@ build.doLast { file("dist/processing-vr-${vrLibVersion}-sources.jar").toPath(), REPLACE_EXISTING); Files.copy(file("$buildDir/libs/vr.jar.MD5").toPath(), file("dist/processing-vr-${vrLibVersion}.jar.md5").toPath(), REPLACE_EXISTING); - Files.copy(file("$buildDir/publications/corePublication/pom-default.xml").toPath(), + Files.copy(file("$buildDir/publications/vrPublication/pom-default.xml").toPath(), file("dist/processing-vr-${vrLibVersion}.pom").toPath(), REPLACE_EXISTING); } From 3049181ecdccf92fdb7ab900b45df142d9f3dadc Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Fri, 8 Jan 2021 17:22:44 +0530 Subject: [PATCH 05/12] Correcting vr pom path --- mode/libraries/vr/build.gradle | 45 +--------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/mode/libraries/vr/build.gradle b/mode/libraries/vr/build.gradle index 041e605e..19304fb1 100644 --- a/mode/libraries/vr/build.gradle +++ b/mode/libraries/vr/build.gradle @@ -13,49 +13,6 @@ dependencies { implementationAar "com.google.vr:sdk-base:${gvrVersion}" } -/* -task createPom { - pom { - project { - groupId "org.p5android" - artifactId "processing-vr" - version "${vrLibVersion}" - packaging "jar" - licenses { - license { - name "GNU Lesser General Public License, version 2.1" - url "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt" - distribution "repo" - } - } - dependencies { - dependency { - groupId "org.p5android" - artifactId "processing-core" - version "${modeVersion}" - scope "implementation" - } - - dependency { - groupId "com.google.vr" - artifactId "sdk-base" - version "${gvrVersion}" - scope "implementation" - } - dependency { - groupId "com.google.vr" - artifactId "sdk-audio" - version "${gvrVersion}" - scope "implementation" - } - } - } - }.writeTo("dist/processing-vr-${vrLibVersion}.pom") -} - - - */ - task sourceJar(type: Jar, dependsOn: classes) { classifier = "sources" from sourceSets.main.allSource @@ -151,7 +108,7 @@ compileJava.doFirst { build.doLast { // If xml doesn't exist - def pomfile = file("${buildDir}/publications/corePublication/pom-default.xml") + def pomfile = file("${buildDir}/publications/vrPublication/pom-default.xml") if (!pomfile.exists()) { println("************************************************************************************************\n" + "* *\n" + From cbe191668f764f256418ed16396fba8b7c587a1e Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sat, 9 Jan 2021 00:30:38 +0530 Subject: [PATCH 06/12] Using Version Variables in 'build.gradle' core --- core/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 8000d7b9..4608d79a 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -37,20 +37,20 @@ publishing { } } pom.withXml { // Only one dependency is added under dependancies node - asNode().remove(asNode().get("dependencies")) //removing dependencies node + asNode().remove(asNode().get("dependencies")) // removing dependencies node // inserting the dependencies node def dependenciesNode = asNode().appendNode('dependencies') // start adding dependency nodes inside dependencies node def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', 'androidx.legacy') dependencyNode.appendNode('artifactId', 'legacy-support-v4') - dependencyNode.appendNode('version', '1.0.0') + dependencyNode.appendNode('version', "${v4legacyVersion}") dependencyNode.appendNode('scope', 'implementation') def dependencyNode2 = dependenciesNode.appendNode('dependency') dependencyNode2.appendNode('groupId', 'com.google.android.support') dependencyNode2.appendNode('artifactId', 'wearable') - dependencyNode2.appendNode('version', '2.8.1') + dependencyNode2.appendNode('version', "${wearVersion}") dependencyNode2.appendNode('scope', 'implementation') def dependencyNode3 = dependenciesNode.appendNode('dependency') From 9b46630bda1ed11b6df4276a63456aa757d5db7a Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sat, 9 Jan 2021 00:33:09 +0530 Subject: [PATCH 07/12] Using Version Variables in 'build.gradle' AR --- mode/libraries/ar/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/libraries/ar/build.gradle b/mode/libraries/ar/build.gradle index 45ee913e..0e8b5c85 100644 --- a/mode/libraries/ar/build.gradle +++ b/mode/libraries/ar/build.gradle @@ -43,13 +43,13 @@ publishing { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', 'org.p5android') dependencyNode.appendNode('artifactId', 'processing-core') - dependencyNode.appendNode('version', '4.2.0') + dependencyNode.appendNode('version', "${modeVersion}") dependencyNode.appendNode('scope', 'implementation') def dependencyNode2 = dependenciesNode.appendNode('dependency') dependencyNode2.appendNode('groupId', 'com.google.ar') dependencyNode2.appendNode('artifactId', 'core') - dependencyNode2.appendNode('version', '1.22.0') + dependencyNode2.appendNode('version', "${garVersion}") dependencyNode2.appendNode('scope', 'implementation') } From eda4196de66b862c763cb98384c9f8ff96467ea8 Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sat, 9 Jan 2021 00:38:05 +0530 Subject: [PATCH 08/12] Using Version Variables in 'build.gradle' VR --- mode/libraries/vr/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mode/libraries/vr/build.gradle b/mode/libraries/vr/build.gradle index 19304fb1..209b52bd 100644 --- a/mode/libraries/vr/build.gradle +++ b/mode/libraries/vr/build.gradle @@ -44,19 +44,19 @@ publishing { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', 'org.p5android') dependencyNode.appendNode('artifactId', 'processing-core') - dependencyNode.appendNode('version', '4.2.0') + dependencyNode.appendNode('version', "${modeVersion}") dependencyNode.appendNode('scope', 'implementation') def dependencyNode2 = dependenciesNode.appendNode('dependency') dependencyNode2.appendNode('groupId', 'com.google.vr') dependencyNode2.appendNode('artifactId', 'sdk-base') - dependencyNode2.appendNode('version', '1.180.0') + dependencyNode2.appendNode('version', "${gvrVersion}") dependencyNode2.appendNode('scope', 'implementation') def dependencyNode3 = dependenciesNode.appendNode('dependency') dependencyNode3.appendNode('groupId', 'com.google.vr') dependencyNode3.appendNode('artifactId', 'sdk-audio') - dependencyNode3.appendNode('version', '1.180.0') + dependencyNode3.appendNode('version', "${gvrVersion}") dependencyNode3.appendNode('scope', 'implementation') } } From 16bcc8ad8f837c315e874068b369bb2d9571f89a Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sat, 9 Jan 2021 04:32:52 +0530 Subject: [PATCH 09/12] Removed duplicate source block in VR build --- core/build.gradle | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 4608d79a..651e9e37 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -11,16 +11,27 @@ dependencies { implementationAar "com.google.android.support:wearable:${wearVersion}" } -task sourceJar(type: Jar) { - from sourceSets.main.allJava - archiveClassifier = "sources" +sourceSets { + main { + java { + srcDirs = ["src/"] + } + resources { + srcDirs = ["src/"] + } + } +} + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = "sources" + from sourceSets.main.allSource } publishing { publications { corePublication(MavenPublication) { from components.java - artifact sourceJar + artifact sourcesJar pom { groupId = "org.p5android" artifactId = "processing-core" @@ -61,22 +72,6 @@ publishing { } } -sourceSets { - main { - java { - srcDirs = ["src/"] - } - resources { - srcDirs = ["src/"] - } - } -} - -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource -} - // Does not work because of Processing-specific tags in source code, such as @webref task javadocJar(type: Jar, dependsOn: javadoc) { classifier = "javadoc" From 1f494d49843d12c997d11811b71ceeb87939f19f Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sun, 10 Jan 2021 02:22:47 +0530 Subject: [PATCH 10/12] Proper naming of variables correction in AR build --- mode/libraries/ar/build.gradle | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/mode/libraries/ar/build.gradle b/mode/libraries/ar/build.gradle index 0e8b5c85..6bb5b9c0 100644 --- a/mode/libraries/ar/build.gradle +++ b/mode/libraries/ar/build.gradle @@ -40,20 +40,18 @@ publishing { // inserting the dependencies node def dependenciesNode = asNode().appendNode('dependencies') // start adding dependency nodes inside dependencies node - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', 'org.p5android') - dependencyNode.appendNode('artifactId', 'processing-core') - dependencyNode.appendNode('version', "${modeVersion}") - dependencyNode.appendNode('scope', 'implementation') + def processingCoreDependencyNode = dependenciesNode.appendNode('dependency') + processingCoreDependencyNode.appendNode('groupId', 'org.p5android') + processingCoreDependencyNode.appendNode('artifactId', 'processing-core') + processingCoreDependencyNode.appendNode('version', "${modeVersion}") + processingCoreDependencyNode.appendNode('scope', 'implementation') - def dependencyNode2 = dependenciesNode.appendNode('dependency') - dependencyNode2.appendNode('groupId', 'com.google.ar') - dependencyNode2.appendNode('artifactId', 'core') - dependencyNode2.appendNode('version', "${garVersion}") - dependencyNode2.appendNode('scope', 'implementation') + def googleARDependencyNode = dependenciesNode.appendNode('dependency') + googleARDependencyNode.appendNode('groupId', 'com.google.ar') + googleARDependencyNode.appendNode('artifactId', 'core') + googleARDependencyNode.appendNode('version', "${garVersion}") + googleARDependencyNode.appendNode('scope', 'implementation') } - - } } } From 1a508f234e3e91c99ad17a78a6d8032381477b29 Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sun, 10 Jan 2021 02:30:10 +0530 Subject: [PATCH 11/12] Proper naming of variables correction in Core build --- core/build.gradle | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 651e9e37..1e6ee872 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -52,21 +52,21 @@ publishing { // inserting the dependencies node def dependenciesNode = asNode().appendNode('dependencies') // start adding dependency nodes inside dependencies node - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', 'androidx.legacy') - dependencyNode.appendNode('artifactId', 'legacy-support-v4') - dependencyNode.appendNode('version', "${v4legacyVersion}") - dependencyNode.appendNode('scope', 'implementation') + def androidLegacyDependancyNode = dependenciesNode.appendNode('dependency') + androidLegacyDependancyNode.appendNode('groupId', 'androidx.legacy') + androidLegacyDependancyNode.appendNode('artifactId', 'legacy-support-v4') + androidLegacyDependancyNode.appendNode('version', "${v4legacyVersion}") + androidLegacyDependancyNode.appendNode('scope', 'implementation') - def dependencyNode2 = dependenciesNode.appendNode('dependency') - dependencyNode2.appendNode('groupId', 'com.google.android.support') - dependencyNode2.appendNode('artifactId', 'wearable') - dependencyNode2.appendNode('version', "${wearVersion}") - dependencyNode2.appendNode('scope', 'implementation') + def wearableDependencyNode = dependenciesNode.appendNode('dependency') + wearableDependencyNode.appendNode('groupId', 'com.google.android.support') + wearableDependencyNode.appendNode('artifactId', 'wearable') + wearableDependencyNode.appendNode('version', "${wearVersion}") + wearableDependencyNode.appendNode('scope', 'implementation') - def dependencyNode3 = dependenciesNode.appendNode('dependency') - dependencyNode3.appendNode('artifactId', 'android') - dependencyNode3.appendNode('scope', 'runtime') + def androidRuntimeDependencyNode = dependenciesNode.appendNode('dependency') + androidRuntimeDependencyNode.appendNode('artifactId', 'android') + androidRuntimeDependencyNode.appendNode('scope', 'runtime') } } } From 440f57fd11f68513f1f2ff23416c4d1c330df767 Mon Sep 17 00:00:00 2001 From: Rupesh Kumar <46577873+rupesh-kumar-lpu@users.noreply.github.com> Date: Sun, 10 Jan 2021 02:36:35 +0530 Subject: [PATCH 12/12] Proper naming of variables correction in VR build --- mode/libraries/vr/build.gradle | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/mode/libraries/vr/build.gradle b/mode/libraries/vr/build.gradle index 209b52bd..9204ea64 100644 --- a/mode/libraries/vr/build.gradle +++ b/mode/libraries/vr/build.gradle @@ -41,23 +41,23 @@ publishing { // inserting the dependencies node def dependenciesNode = asNode().appendNode('dependencies') // start adding dependency nodes inside dependencies node - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', 'org.p5android') - dependencyNode.appendNode('artifactId', 'processing-core') - dependencyNode.appendNode('version', "${modeVersion}") - dependencyNode.appendNode('scope', 'implementation') - - def dependencyNode2 = dependenciesNode.appendNode('dependency') - dependencyNode2.appendNode('groupId', 'com.google.vr') - dependencyNode2.appendNode('artifactId', 'sdk-base') - dependencyNode2.appendNode('version', "${gvrVersion}") - dependencyNode2.appendNode('scope', 'implementation') - - def dependencyNode3 = dependenciesNode.appendNode('dependency') - dependencyNode3.appendNode('groupId', 'com.google.vr') - dependencyNode3.appendNode('artifactId', 'sdk-audio') - dependencyNode3.appendNode('version', "${gvrVersion}") - dependencyNode3.appendNode('scope', 'implementation') + def processingCoreDependencyNode = dependenciesNode.appendNode('dependency') + processingCoreDependencyNode.appendNode('groupId', 'org.p5android') + processingCoreDependencyNode.appendNode('artifactId', 'processing-core') + processingCoreDependencyNode.appendNode('version', "${modeVersion}") + processingCoreDependencyNode.appendNode('scope', 'implementation') + + def googleVRDependencyNode = dependenciesNode.appendNode('dependency') + googleVRDependencyNode.appendNode('groupId', 'com.google.vr') + googleVRDependencyNode.appendNode('artifactId', 'sdk-base') + googleVRDependencyNode.appendNode('version', "${gvrVersion}") + googleVRDependencyNode.appendNode('scope', 'implementation') + + def googleVRAudioDependencyNode = dependenciesNode.appendNode('dependency') + googleVRAudioDependencyNode.appendNode('groupId', 'com.google.vr') + googleVRAudioDependencyNode.appendNode('artifactId', 'sdk-audio') + googleVRAudioDependencyNode.appendNode('version', "${gvrVersion}") + googleVRAudioDependencyNode.appendNode('scope', 'implementation') } } }