Skip to content

Commit

Permalink
1.移除上传到jcenter仓库的配置
Browse files Browse the repository at this point in the history
  • Loading branch information
caikaidev committed Oct 30, 2016
1 parent fdc57cd commit 6a97412
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 99 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ replace:
in app's build.gradle,add:

```
compile 'com.kcode.github:autoScrollViewPager:0.7.0'
compile 'com.kcode.github:autoScrollViewPager:0.9.3'
```

##Usage
Expand Down
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ dependencies {
compile 'com.android.support:appcompat-v7:24.2.0'
testCompile 'junit:junit:4.12'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.github.fccaikai:AutoScrollViewPager:0.8.0', {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
// compile 'com.github.fccaikai:AutoScrollViewPager:0.8.0', {
// exclude group: 'com.android.support', module: 'appcompat-v7'
// }
compile project(':autoScrollViewPager')
}
13 changes: 11 additions & 2 deletions app/src/main/java/com/kcode/autoviewpager/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

mViewPager = (AutoScrollViewPager) findViewById(R.id.viewPager);
mViewPager.setAdapter(new BaseViewPagerAdapter<String>(this,initData(),listener) {

BaseViewPagerAdapter<String> adapter = new BaseViewPagerAdapter<String>(this,listener) {
@Override
public void loadImage(ImageView view, int position, String url) {
Picasso.with(MainActivity.this).load(url).into(view);
}
});
};
mViewPager.setAdapter(adapter);

try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
adapter.add(initData());


}
Expand Down
86 changes: 1 addition & 85 deletions autoScrollViewPager/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

// This is the library version used when deploying the artifact
version = "0.2.0"

android {
compileSdkVersion 24
Expand All @@ -25,84 +21,4 @@ android {

dependencies {
compile 'com.android.support:appcompat-v7:24.2.0'
}

def siteUrl = 'https://github.com/fccaikai/AutoScrollViewPager' // Homepage URL of the library
def gitUrl = 'https://github.com/fccaikai/AutoScrollViewPager.git' // Git repository URL
group = "com.kcode.github" // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'

// Add your description here
name 'com.kcode.github:AutoScrollViewPager' // TODO
description = 'android auto scroll viewpager' // TODO
url siteUrl

// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'caikai' // TODO
name 'caikai' // TODO
email 'ck19920702@gmail.com' // TODO
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

// https://github.com/bintray/gradle-bintray-plugin
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = "maven"
// it is the name that appears in bintray when logged
name = "AutoViewPager" // TODO
websiteUrl = siteUrl
userOrg = "kcode"
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ public void add(List<T> list){
}

data.addAll(list);
//设置初始为中间,这样一开始就能够往左滑动了
mView.setCurrentItem(0);

notifyDataSetChanged();

mView.start();
mView.updatePointView(getRealCount());
notifyDataSetChanged();

}

@Override
Expand Down
5 changes: 0 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ buildscript {

}

plugins {
id "com.jfrog.bintray" version "1.7"
id "com.github.dcendents.android-maven" version "1.5"
}

allprojects {
repositories {
jcenter()
Expand Down

0 comments on commit 6a97412

Please sign in to comment.