Skip to content

Commit

Permalink
package名変更
Browse files Browse the repository at this point in the history
  • Loading branch information
daneko committed Nov 1, 2014
1 parent 991f2cc commit 86ffd8b
Show file tree
Hide file tree
Showing 25 changed files with 99 additions and 72 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

```
repositories {
maven { url 'http://daneko.github.io/android-inapp-library/repository' }
maven { url 'https://daneko.github.io/m2repo/repository' }
}
dependencies {
compile 'jp.daneko:android-inapp-library:0.0.1-SNAPSHOT@aar'
compile 'com.github.daneko:android-inapp-library:0.0.1-SNAPSHOT'
}
```

Expand Down Expand Up @@ -49,6 +49,7 @@ java8_home=/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home
java7_home=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
## for sample app
public_key=copy from google developer console
release.storeFile=/path/to/your.keystore
release.storePass=store pass
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.android.tools.build:gradle:0.13.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -23,3 +23,7 @@ allprojects {
}
}
}

task wrapper(type: Wrapper){
gradleVersion = '2.1'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013
#Sat Nov 01 13:49:50 JST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
61 changes: 39 additions & 22 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ buildscript {
}
}

// local.properties
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def j8Home = properties.getProperty('java8_home')
def j7Home = properties.getProperty('java7_home')
def m2dir = properties.getProperty('upload.dir')

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'
apply plugin: 'retrolambda'
Expand All @@ -22,14 +29,14 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

compileSdkVersion 20
buildToolsVersion "20.0.0"
compileSdkVersion 21
buildToolsVersion "21.1"

defaultConfig {
// com.exampleはgoogle play に上げられなかった
applicationId "jp.daneko.android.billing"
applicationId "com.github.daneko.android.iab"
minSdkVersion 15
targetSdkVersion 20
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -60,8 +67,6 @@ dependencies {

provided 'org.projectlombok:lombok:1.14.8'

compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.10'
testCompile 'org.robolectric:robolectric:2.3'
testCompile 'com.squareup.assertj:assertj-android:1.0.0'
Expand All @@ -83,18 +88,13 @@ androidUnitTest {
}

retrolambda {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def j8Home = properties.getProperty('java8_home')
def j7Home = properties.getProperty('java7_home')

jdk j8Home ?: System.getenv("JAVA8_HOME")
oldJdk j7Home ?: System.getenv("JAVA7_HOME")
javaVersion JavaVersion.VERSION_1_7
//jvmArgs '-arg1', '-arg2'
}


/**
* android-unit-test と retrolambda はpluginなので、評価後でないとtaskとして取得できない
* また android-unit-test が提供する test / testClasses というコマンドのうちの前者に
Expand All @@ -111,23 +111,40 @@ afterEvaluate {
/**
* archive
*/

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

artifacts {
archives androidSourcesJar
archives androidSourcesJar
}

def repoPath = m2dir ?: "/tmp"

uploadArchives {
repositories {
mavenDeployer {
repository url: "file://${project.rootDir}/../android_inapp_library_maven/repository"
pom.version = '0.0.1-SNAPSHOT'
pom.groupId = 'jp.daneko'
pom.artifactId = 'android-inapp-library'
repositories {
mavenDeployer {
repository(url: uri("${repoPath}/repository"))
pom.version = '0.0.1-SNAPSHOT'
pom.groupId = 'com.github.daneko'
pom.artifactId = 'android-inapp-library'
pom.project {
inceptionYear '2014'
packaging 'aar'
licenses {
license {
name 'The MIT License'
url 'https://github.com/daneko/android-inapp-library/blob/master/LICENSE.txt'
distribution 'repo'
}
}
scm {
connection 'scm:https://[email protected]/daneko/android-inapp-library'
developerConnection 'scm:[email protected]/daneko/android-inapp-library.git'
url 'https://github.com/daneko/android-inapp-library'
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jp.daneko.android.inappv3">
package="com.github.daneko.android.iab">

<!-- for in-app billing -->
<uses-permission android:name="com.android.vending.BILLING"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3;
package com.github.daneko.android.iab;

import android.os.Bundle;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package jp.daneko.android.inappv3;
package com.github.daneko.android.iab;

import android.app.Activity;

import rx.subjects.PublishSubject;

import jp.daneko.android.inappv3.model.ActivityResults;
import com.github.daneko.android.iab.model.ActivityResults;

/**
* 名前はあとで考える
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3;
package com.github.daneko.android.iab;

import android.app.Activity;
import android.app.PendingIntent;
Expand Down Expand Up @@ -41,14 +41,14 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

import jp.daneko.android.inappv3.exception.IabException;
import jp.daneko.android.inappv3.model.ActivityResults;
import jp.daneko.android.inappv3.model.BillingType;
import jp.daneko.android.inappv3.model.IabItemType;
import jp.daneko.android.inappv3.model.Product;
import jp.daneko.android.inappv3.model.ProductBaseInfo;
import jp.daneko.android.inappv3.model.Purchase;
import jp.daneko.android.inappv3.model.SkuDetails;
import com.github.daneko.android.iab.exception.IabException;
import com.github.daneko.android.iab.model.ActivityResults;
import com.github.daneko.android.iab.model.BillingType;
import com.github.daneko.android.iab.model.IabItemType;
import com.github.daneko.android.iab.model.Product;
import com.github.daneko.android.iab.model.ProductBaseInfo;
import com.github.daneko.android.iab.model.Purchase;
import com.github.daneko.android.iab.model.SkuDetails;

/**
* sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3;
package com.github.daneko.android.iab;

import android.app.Activity;
import android.content.ComponentName;
Expand Down Expand Up @@ -28,8 +28,8 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

import jp.daneko.android.inappv3.exception.IabException;
import jp.daneko.android.inappv3.model.IabItemType;
import com.github.daneko.android.iab.exception.IabException;
import com.github.daneko.android.iab.model.IabItemType;

import static fj.data.Option.none;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.exception;
package com.github.daneko.android.iab.exception;

/**
* 事実上Runtimeなのでは感
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import android.content.Intent;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import javax.annotation.Nonnull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import javax.annotation.Nonnull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import javax.annotation.Nonnull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import fj.Ord;
import fj.Ordering;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import org.json.JSONObject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3.model;
package com.github.daneko.android.iab.model;

import org.json.JSONObject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* このパッケージはGoogleのInapp Billing のサンプル($ANDROID_HOME/extras/google/play_billing/samples/TrivialDrive)を元に
* RxJavaとかを使って試しに再実装したものが置いてある
*/
package jp.daneko.android.inappv3;
package com.github.daneko.android.iab;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jp.daneko.android.inappv3;
package com.github.daneko.android.iab;


import android.os.Bundle;
Expand Down Expand Up @@ -33,12 +33,12 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

import jp.daneko.android.inappv3.model.Product;
import jp.daneko.android.inappv3.model.BillingType;
import jp.daneko.android.inappv3.model.IabItemType;
import jp.daneko.android.inappv3.model.ProductBaseInfo;
import jp.daneko.android.inappv3.model.Purchase;
import jp.daneko.android.inappv3.model.SkuDetails;
import com.github.daneko.android.iab.model.Product;
import com.github.daneko.android.iab.model.BillingType;
import com.github.daneko.android.iab.model.IabItemType;
import com.github.daneko.android.iab.model.ProductBaseInfo;
import com.github.daneko.android.iab.model.Purchase;
import com.github.daneko.android.iab.model.SkuDetails;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
Expand Down
13 changes: 9 additions & 4 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

compileSdkVersion 20
buildToolsVersion "20.0.0"
compileSdkVersion 21
buildToolsVersion "21.1"

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
Expand All @@ -34,7 +34,7 @@ android {
// com.exampleはgoogle play に上げられなかった
applicationId "jp.daneko.example"
minSdkVersion 15
targetSdkVersion 20
targetSdkVersion 21
versionCode 4
versionName "0.1 alpha"
buildConfigField "String", "PUBLIC_KEY", "\"$publicKey\""
Expand Down Expand Up @@ -69,9 +69,14 @@ android {
}
}

repositories {
maven { url 'https://daneko.github.io/m2repo/repository' }
}

dependencies {

compile project(':library')
debugCompile project(':library')
releaseCompile 'com.github.daneko:android-inapp-library:0.0.1-SNAPSHOT'

// for slf4j
compile 'com.github.tony19:logback-android-core:1.1.1-3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import fj.F;
import fj.Unit;

import jp.daneko.android.inappv3.model.Product;
import jp.daneko.android.inappv3.model.SkuDetails;
import com.github.daneko.android.iab.model.Product;
import com.github.daneko.android.iab.model.SkuDetails;

/**
*/
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/java/jp/daneko/example/MyActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

import lombok.Getter;

import jp.daneko.android.inappv3.model.ActivityResults;
import jp.daneko.android.inappv3.IabContext;
import com.github.daneko.android.iab.model.ActivityResults;
import com.github.daneko.android.iab.IabContext;

public class MyActivity extends Activity implements IabContext {

Expand Down
6 changes: 3 additions & 3 deletions sample/src/main/java/jp/daneko/example/MyFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import lombok.extern.slf4j.Slf4j;

import jp.daneko.android.inappv3.IabContext;
import jp.daneko.android.inappv3.IabService;
import jp.daneko.android.inappv3.model.Product;
import com.github.daneko.android.iab.IabContext;
import com.github.daneko.android.iab.IabService;
import com.github.daneko.android.iab.model.Product;

/**
* A placeholder fragment containing a simple view.
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/java/jp/daneko/example/MyProducts.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import fj.data.Set;

import jp.daneko.android.inappv3.model.BillingType;
import jp.daneko.android.inappv3.model.ProductBaseInfo;
import com.github.daneko.android.iab.model.BillingType;
import com.github.daneko.android.iab.model.ProductBaseInfo;

/**
*/
Expand Down

0 comments on commit 86ffd8b

Please sign in to comment.