Skip to content

Commit dc2806f

Browse files
authored
Merge pull request #38 from wordpress-mobile/issue/move-to-bintray
Move to bintray
2 parents ad06a74 + 8603be7 commit dc2806f

3 files changed

Lines changed: 32 additions & 87 deletions

File tree

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Note: This library doesn't add any extra protection to your data. App data will
1111
Add it as a maven dependency in your build.gradle file. PasscodeLock is hosted on the maven central repository.
1212

1313
* In your build.gradle:
14-
```
14+
```groovy
1515
dependencies {
1616
// use the latest 1.x version
1717
compile 'org.wordpress:passcodelock:1.+'
1818
}
1919
```
2020
* Edit your `AndroidManifest.xml` and declare the following activities:
21-
```
21+
```xml
2222
<activity
2323
android:name="org.wordpress.passcodelock.PasscodeUnlockActivity"
2424
android:theme="@style/Theme.Sherlock.Light.NoActionBar"
@@ -32,19 +32,26 @@ dependencies {
3232
```
3333

3434
* Add the following line in `onCreate` of your App file:
35-
```
35+
```java
3636
AppLockManager.getInstance().enableDefaultAppLockIfAvailable(this);
3737
```
3838

3939
* In your project you need to use `PasscodePreferenceFragment` in your Preference Activity. See [SettingsActivity][2] as a usage reference. Optionally, you may pass an argument that tells it whether or not to inflate its own preferences, this is only needed if you plan on [providing the preferences](https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/res/xml/settings.xml#L39) via [PasscodePreferenceFragment#setPreferences](https://github.com/wordpress-mobile/PasscodeLock-Android/blob/develop/library/src/org/wordpress/passcodelock/PasscodePreferenceFragment.java#L50).
4040

4141
## Customization
42+
4243
If you want to customize the pinlock icon, the one available in the unlock screen, override the `passcode_logo.xml` drawable resource.
4344

4445
## Hack the library
4546

4647
* Copy `gradle.properties-example` to `gradle.properties` in the `library/` directory of the project.
4748

49+
Publish it to bintray:
50+
51+
```shell
52+
$ ./gradlew assemble publishToMavenLocal bintrayUpload -PbintrayUser=FIXME -PbintrayKey=FIXME -PdryRun=false
53+
```
54+
4855
## Apps that use this library
4956
- [WordPress for Android][1]
5057

@@ -53,4 +60,4 @@ Dual licensed under MIT, and GPL.
5360

5461
[1]: https://github.com/wordpress-mobile/WordPress-Android
5562

56-
[2]: https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/java/org/wordpress/android/ui/prefs/SettingsActivity.java
63+
[2]: https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/java/org/wordpress/android/ui/prefs/SettingsActivity.java

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

library/build.gradle

Lines changed: 20 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
buildscript {
22
repositories {
3-
mavenCentral()
3+
jcenter()
44
}
55
dependencies {
6-
classpath 'com.android.tools.build:gradle:1.5.0'
6+
classpath 'com.android.tools.build:gradle:2.1.2'
7+
classpath 'com.novoda:bintray-release:0.3.4'
78
}
89
}
910

1011
apply plugin: 'com.android.library'
1112
apply plugin: 'maven'
12-
apply plugin: 'signing'
13+
apply plugin: 'com.novoda.bintray-release'
1314

1415
repositories {
15-
mavenCentral()
16+
jcenter()
1617
}
1718

1819
dependencies {
19-
compile 'com.android.support:appcompat-v7:23.1.1'
20+
compile 'com.android.support:appcompat-v7:24.1.1'
2021
}
2122

2223
android {
23-
compileSdkVersion 23
24-
buildToolsVersion "23.0.3"
24+
compileSdkVersion 24
25+
buildToolsVersion "24.0.1"
2526

2627
defaultConfig {
2728
versionName "1.2.0"
2829
minSdkVersion 9
29-
targetSdkVersion 23
30+
targetSdkVersion 24
3031
}
3132

3233
sourceSets {
@@ -50,78 +51,15 @@ android.buildTypes.all { buildType ->
5051
}
5152
}
5253

53-
signing {
54-
required {
55-
project.properties.containsKey("signing.keyId") && project.properties.containsKey("signing.secretKeyRingFile")
56-
}
57-
sign configurations.archives
58-
}
59-
60-
version android.defaultConfig.versionName
61-
group = "org.wordpress"
62-
archivesBaseName = "passcodelock"
63-
64-
// http://central.sonatype.org/pages/gradle.html
65-
66-
uploadArchives {
67-
repositories {
68-
mavenDeployer {
69-
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
70-
71-
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
72-
authentication(userName: project.properties.ossrhUsername, password: project.properties.ossrhPassword)
73-
}
74-
75-
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
76-
authentication(userName: project.properties.ossrhUsername, password: project.properties.ossrhPassword)
77-
}
78-
79-
pom.project {
80-
name 'PasscodeLock-Android'
81-
packaging 'aar'
82-
description 'Android Library that provides passcode lock to your app'
83-
url 'https://github.com/wordpress-mobile/PasscodeLock-Android'
84-
scm {
85-
connection 'scm:git:https://github.com/wordpress-mobile/PasscodeLock-Android.git'
86-
developerConnection 'scm:git:https://github.com/wordpress-mobile/PasscodeLock-Android.git'
87-
url 'https://github.com/wordpress-mobile/PasscodeLock-Android'
88-
}
89-
90-
licenses {
91-
license {
92-
name 'The MIT License (MIT)'
93-
url 'http://opensource.org/licenses/MIT'
94-
}
95-
}
96-
97-
developers {
98-
developer {
99-
id 'daniloercoli'
100-
name 'Danilo Ercoli'
101-
email 'danilo@automattic.com'
102-
}
103-
developer {
104-
id 'tonyr59h'
105-
name 'Anthony Rankin'
106-
email 'tonyr@automattic.com'
107-
}
108-
developer {
109-
id 'roundhill'
110-
name 'Dan Roundhill'
111-
email 'dan@automattic.com'
112-
}
113-
developer {
114-
id 'maxme'
115-
name 'Maxime Biais'
116-
email 'maxime@automattic.com'
117-
}
118-
developer {
119-
id 'theck13'
120-
name 'Tyler Heck'
121-
email 'tyler@automattic.com'
122-
}
123-
}
124-
}
125-
}
126-
}
54+
publish {
55+
userOrg = 'wordpress-mobile'
56+
groupId = 'org.wordpress'
57+
uploadName = 'passcodelock'
58+
artifactId = 'passcodelock'
59+
description = ' Android Library that provides passcode lock to your app'
60+
publishVersion = android.defaultConfig.versionName
61+
licences = ['MIT', 'GPL-2.0']
62+
website = 'https://github.com/wordpress-mobile/PasscodeLock-Android'
63+
dryRun = 'false'
64+
autoPublish = 'true'
12765
}

0 commit comments

Comments
 (0)