Skip to content

Commit 0b4d550

Browse files
authored
Make repository jitpack.io compatible (#145)
1 parent fac7f3d commit 0b4d550

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,24 @@ versions.
4646
Usage
4747
-----
4848

49+
Follow the guidelines from [jitpack.io](https://jitpack.io) to add the JitPack repository to your build file if you have not.
50+
51+
Typically, this means an edit to your `build.gradle` file to add a new `repository` definition in the `allprojects` block, like this:
52+
53+
```gradle
54+
allprojects {
55+
repositories {
56+
...
57+
maven { url 'https://jitpack.io' }
58+
}
59+
}
60+
```
61+
62+
Then add the sqlite-android artifact from this repository as a dependency:
63+
4964
```gradle
5065
dependencies {
51-
implementation 'io.requery:sqlite-android:3.35.4'
66+
implementation 'com.github.requery:sqlite-android:3.35.4'
5267
}
5368
```
5469
Then change usages of `android.database.sqlite.SQLiteDatabase` to

sqlite-android/build.gradle

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = 'Android SQLite compatibility library'
1313
android {
1414
compileSdkVersion 30
1515
buildToolsVersion "30.0.3"
16-
ndkVersion '21.4.7075529'
16+
ndkVersion '21.1.6352462'
1717

1818
defaultConfig {
1919
minSdkVersion 14
@@ -101,19 +101,28 @@ if (localProperties.exists()) {
101101
}
102102

103103
task sourceJar(type: Jar) {
104-
classifier = 'sources'
104+
archiveClassifier.set('sources')
105105
from android.sourceSets.main.java.srcDirs
106106
}
107107

108108
task javadoc(type: Javadoc) {
109109
source = android.sourceSets.main.java.srcDirs
110110
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
111-
classpath += configurations.compile
111+
android.libraryVariants.all { variant ->
112+
if (variant.name == 'release') {
113+
owner.classpath += variant.javaCompileProvider.get().classpath
114+
}
115+
}
116+
exclude '**/R.html', '**/R.*.html', '**/index.html'
117+
if (JavaVersion.current().isJava9Compatible()) {
118+
options.addBooleanOption('html5', true)
119+
}
120+
112121
failOnError false
113122
}
114123

115124
task javadocJar(type: Jar, dependsOn: javadoc) {
116-
classifier = 'javadoc'
125+
archiveClassifier.set('javadoc')
117126
from javadoc.destinationDir
118127
}
119128

@@ -129,7 +138,7 @@ publishing {
129138
pom.withXml {
130139
asNode().children().last() + project.pomXml
131140
def dependencies = asNode().appendNode('dependencies')
132-
configurations.compile.allDependencies.each {
141+
configurations.compile.allDependencies.all {
133142
def dependency = dependencies.appendNode('dependency')
134143
dependency.appendNode('groupId', it.group)
135144
dependency.appendNode('artifactId', it.name)
@@ -139,15 +148,6 @@ publishing {
139148
}
140149
}
141150
}
142-
repositories {
143-
maven {
144-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
145-
credentials {
146-
username properties.getProperty('sonatype.username')
147-
password properties.getProperty('sonatype.password')
148-
}
149-
}
150-
}
151151
}
152152

153153
publish.dependsOn "assembleRelease"

0 commit comments

Comments
 (0)