Skip to content

Commit 496242c

Browse files
committed
JA-49 #time 30m committed changes to build.gradle files for JFrog support
1 parent 53a4835 commit 496242c

File tree

2 files changed

+73
-166
lines changed

2 files changed

+73
-166
lines changed

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle

Lines changed: 14 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
apply plugin: 'com.android.library'
44
apply plugin: 'com.github.dcendents.android-maven'
5+
apply plugin: 'com.jfrog.artifactory'
56
apply plugin: 'maven-publish'
6-
apply plugin: 'com.jfrog.bintray'
77

8-
version = '3.0.69Beta_AA-245_AA-246'
8+
version = '3.0.65Beta'
99

1010
android {
1111
compileSdkVersion 25
@@ -56,169 +56,24 @@ android {
5656
}
5757
}
5858

59-
//repositories {
60-
// mavenCentral()
61-
// maven {
62-
// url "http://192.168.0.139:8081/artifactory/libs-release-local"
63-
// credentials {
64-
// username = "alex"
65-
// password = "AP5DYAtHgg8mmK4Tnrx6RyrniF6"
66-
// }
67-
// }
68-
// flatDir {
69-
// dirs 'libs'
70-
// }
71-
//}
59+
publishing {
60+
artifactoryPublish.dependsOn('build')
61+
publications {
62+
mavenJava(MavenPublication) {
63+
groupId = 'com.shimmersensing'
64+
version = project.version
65+
artifactId project.getName()
66+
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
67+
}
68+
}
69+
}
7270

7371
dependencies {
74-
//compile 'com.shimmerresearch:shimmerDriver:0.3.3'
75-
// compile 'org.apache.commons:commons-lang3:3.4'
76-
// compile 'org.apache.commons:commons-math3:3.6'
77-
// compile 'org.apache.commons:commons-math:2.2'
7872
compile 'com.google.guava:guava:20.0'
7973
compile 'java3d:vecmath:1.3.1'
80-
// compile 'commons-collections:commons-collections:3.2'
81-
82-
//compile 'io.grpc:grpc-okhttp:1.0.0-pre1'
83-
//compile 'io.grpc:grpc-protobuf-lite:1.0.0-pre1'
84-
//compile 'io.grpc:grpc-stub:1.0.0-pre1']
85-
86-
87-
//compile fileTree(include: ['*.jar'], dir: 'libs')
8874
compile files('libs/ShimmerBiophysicalProcessingLibrary_Rev_0_11.jar')
8975
compile files('libs/AndroidBluetoothLibrary.jar')
9076
compile files('libs/androidplot-core-0.5.0-release.jar')
91-
//compile files('libs/ShimmerDriverML.jar')
92-
compile(group: 'com.shimmersensing', name: 'rmshimmerapi', version: '1.3') {
93-
// excluding org.json which is provided by Android
94-
exclude group: 'io.netty'
95-
exclude group: 'io.grpc'
96-
exclude group: 'com.google.protobuf'
97-
exclude group: 'org.apache.commons.math'
98-
}
99-
compile(group: 'com.shimmersensing', name: 'rmshimmerbtmanager', version: '1.3') {
100-
// excluding org.json which is provided by Android
101-
exclude group: 'io.netty'
102-
exclude group: 'io.grpc'
103-
exclude group: 'com.google.protobuf'
104-
exclude group: 'org.apache.commons.math'
105-
}
106-
//For fragments:
77+
implementation group: 'com.shimmersensing', name: 'rmshimmerbtmanager', version:'1.3'
10778
compile 'com.android.support:appcompat-v7:25.3.1'
108-
109-
110-
/*
111-
install {
112-
repositories.mavenInstaller {
113-
// This generates POM.xml with proper parameters
114-
pom {
115-
project {
116-
packaging 'aar'
117-
groupId 'com.shimmerresearch.android'
118-
artifactId 'com.shimmerresearch.android'
119-
120-
// Add your description here
121-
name ''
122-
description ''
123-
url ''
124-
125-
// Set your license
126-
licenses {
127-
license {
128-
name 'MIT License'
129-
url 'https://opensource.org/licenses/MIT'
130-
}
131-
}
132-
developers {
133-
developer {
134-
id 'stefanosiano'
135-
name 'Stefano Siano'
136-
137-
}
138-
}
139-
scm {
140-
connection ''
141-
developerConnection ''
142-
url ''
143-
144-
}
145-
}
146-
}
147-
}
148-
}
149-
*/
150-
151-
152-
153-
154-
if (project.hasProperty("android")) { // Android libraries
155-
task sourcesJar(type: Jar) {
156-
classifier = 'sources'
157-
from android.sourceSets.main.java.srcDirs
158-
}
159-
160-
task javadoc(type: Javadoc) {
161-
source = android.sourceSets.main.java.srcDirs
162-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
163-
}
164-
} else { // Java libraries
165-
task sourcesJar(type: Jar, dependsOn: classes) {
166-
classifier = 'sources'
167-
from sourceSets.main.allSource
168-
}
169-
}
170-
171-
task javadocJar(type: Jar, dependsOn: javadoc) {
172-
classifier = 'javadoc'
173-
from javadoc.destinationDir
174-
}
175-
176-
artifacts {
177-
archives sourcesJar
178-
}
179-
180-
publishing{
181-
publications {
182-
maven(MavenPublication) {
183-
groupId 'com.shimmerresearch.android'
184-
version = project.version
185-
artifactId project.getName()
186-
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
187-
}
188-
}
189-
}
190-
191-
// https://github.com/bintray/gradle-bintray-plugin
192-
File file = new File(rootProject.getProjectDir().getAbsolutePath() + '/gradle.properties')
193-
if(file.exists()) {
194-
bintray {
195-
user = shimmer_bintray_username
196-
//this usually comes from gradle.properties file in ~/.gradle
197-
key = shimmer_bintray_api_key
198-
//this usually comes from gradle.properties file in ~/.gradle
199-
200-
configurations = ['archives']
201-
202-
// Package info for BinTray
203-
pkg {
204-
repo = 'Shimmer'
205-
// it is the name that appears in bintray when logged
206-
name = 'shimmerandroiddriver'
207-
desc = ''
208-
websiteUrl = ''
209-
vcsUrl = 'https://github.com/ShimmerEngineering/ShimmerAndroidAPI'
210-
licenses = ['MIT']
211-
publish = true
212-
publicDownloadNumbers = true
213-
version {
214-
name = project.version
215-
desc = ''
216-
released = new Date()
217-
vcsTag = ''
218-
}
219-
}
220-
}
221-
}
222-
223-
22479
}
Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,79 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
23
buildscript {
3-
ext.kotlin_version = '1.2.30'
4+
ext.kotlin_version = '1.3.10'
45
repositories {
56
google()
6-
jcenter()
7+
mavenCentral()
8+
mavenLocal()
79
}
810
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.1.3'
11+
classpath 'com.android.tools.build:gradle:3.5.1'
1012
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1113
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14+
classpath('org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0')
1215
}
1316
}
1417
// Plugin used to upload authenticated files to BinTray through Gradle
1518
plugins {
16-
id "com.jfrog.bintray" version "1.7.3"
19+
id "com.jfrog.artifactory" version "4.21.0"
1720
}
21+
apply plugin: 'com.jfrog.artifactory'
22+
apply plugin: 'maven-publish'
23+
1824
allprojects {
1925
repositories {
2026
google()
21-
jcenter()
2227
maven {
23-
//url "http://dl.bintray.com/shimmerengineering/Shimmer"
24-
url 'https://shimmersensing.jfrog.io/artifactory/dummyLcl'
28+
url "https://shimmersensing.jfrog.io/artifactory/dummyLcl"
29+
30+
}
31+
mavenCentral()
32+
mavenLocal()
33+
}
34+
artifactory {
35+
contextUrl = "${artifactory_contextUrl}"
36+
publish {
37+
repository {
38+
repoKey = 'dummyLcl'
39+
username = "${artifactory_user}"
40+
password = "${artifactory_password}"
41+
maven = true
42+
}
43+
defaults {
44+
publications('mavenJava')
45+
}
46+
publishBuildInfo = true
47+
publishArtifacts = true
48+
publishPom = true
49+
}
50+
resolve {
51+
repository {
52+
repoKey = 'dummyLcl'
53+
username = "${artifactory_user}"
54+
password = "${artifactory_password}"
55+
maven = true
56+
}
2557
}
2658
}
2759
}
60+
61+
project('ShimmerAndroidInstrumentDriver') {
62+
artifactoryPublish.dependsOn('build')
63+
publishing {
64+
publications {
65+
ShimmerAndroidInstrumentDriver(MavenPublication) {
66+
groupId = 'com.shimmersensing'
67+
version = project.version
68+
artifactId project.getName()
69+
//artifactId = 'rmandroidapi'
70+
//version = '1.3'
71+
artifact("$buildDir/outputs/aar/ShimmerAndroidInstrumentDriver}-release.aar")
72+
}
73+
}
74+
}
75+
76+
artifactoryPublish {
77+
publications(publishing.publications.ShimmerAndroidInstrumentDriver)
78+
}
79+
}

0 commit comments

Comments
 (0)