1
+ buildscript {
2
+ repositories {
3
+ jcenter()
4
+ }
5
+ dependencies {
6
+ classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
7
+ }
8
+ }
9
+
10
+ apply plugin : ' com.jfrog.bintray'
11
+ apply plugin : ' com.android.library'
12
+ apply plugin : ' com.github.dcendents.android-maven'
13
+
14
+ android {
15
+ compileSdkVersion 23
16
+ buildToolsVersion " 23.0.2"
17
+ resourcePrefix ' realm_browser_'
18
+
19
+ defaultConfig {
20
+ minSdkVersion 14
21
+ targetSdkVersion 23
22
+ versionCode Integer . parseInt(project. VERSION_CODE )
23
+ versionName project. VERSION_NAME
24
+ }
25
+ buildTypes {
26
+ release {
27
+ minifyEnabled false
28
+ proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
29
+ }
30
+ }
31
+ }
32
+
33
+ // Open local.properties
34
+ Properties properties = new Properties ()
35
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
36
+
37
+ dependencies {
38
+ compile fileTree(dir : ' libs' , include : [' *.jar' ])
39
+ testCompile ' junit:junit:4.12'
40
+ compile ' com.android.support:appcompat-v7:23.2.0'
41
+ compile ' io.realm:realm-android:0.87.5'
42
+ }
43
+
44
+ /*
45
+ * PUBLISHING
46
+ */
47
+ def siteUrl = ' https://github.com/jonasrottmann/realm-browser' // Homepage URL of the library
48
+ def gitUrl = siteUrl + " .git" // Git repository URL
49
+ group = " de.jonasrottmann"
50
+
51
+ install {
52
+ repositories. mavenInstaller {
53
+ // This generates POM.xml with proper parameters
54
+ pom {
55
+ project {
56
+ packaging ' aar'
57
+
58
+ // Add your description here
59
+ name ' realm-browser-no-op'
60
+ url siteUrl
61
+
62
+ // Set your license
63
+ licenses {
64
+ license {
65
+ name ' The MIT License (MIT)'
66
+ url ' https://opensource.org/licenses/MIT'
67
+ }
68
+ }
69
+ developers {
70
+ developer {
71
+ id ' jonasrottmann'
72
+ name ' Jonas Rottmann'
73
+
74
+ }
75
+ }
76
+ scm {
77
+ connection gitUrl
78
+ developerConnection gitUrl
79
+ url siteUrl
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ task androidJavadocs (type : Javadoc ) {
87
+ source = ' src/main/java'
88
+ }
89
+
90
+ task androidJavadocsJar (type : Jar ) {
91
+ classifier = ' javadoc'
92
+ // basename = artifact_id
93
+ from androidJavadocs. destinationDir
94
+ }
95
+
96
+ task androidSourcesJar (type : Jar ) {
97
+ classifier = ' sources'
98
+ // basename = artifact_id
99
+ from ' src/main/java'
100
+ }
101
+
102
+ artifacts {
103
+ // archives packageReleaseJar
104
+ archives androidSourcesJar
105
+ archives androidJavadocsJar
106
+ }
107
+
108
+ bintray {
109
+ user = properties. getProperty(" bintray.user" )
110
+ key = properties. getProperty(" bintray.apikey" )
111
+
112
+ configurations = [' archives' ]
113
+
114
+ dryRun = false // Whether to run this as dry-run, without deploying
115
+
116
+ // Package configuration. The plugin will use the repo and name properties to check if the package already exists.
117
+ // In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
118
+ pkg {
119
+ repo = ' maven'
120
+ name = ' realm-browser-no-op'
121
+ desc = ' Android Realm Browser (no-op)'
122
+ websiteUrl = siteUrl
123
+ issueTrackerUrl = siteUrl + " /issues"
124
+ vcsUrl = siteUrl
125
+ licenses = [' MIT' ]
126
+ publicDownloadNumbers = true
127
+ }
128
+ }
0 commit comments