Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor package structure #368

Merged
merged 4 commits into from
Mar 30, 2017

Conversation

sav007
Copy link
Contributor

@sav007 sav007 commented Mar 29, 2017

Closes #250

New package structure:

|____com
| |____apollographql
| | |____apollo
| | | |____ApolloCall.java
| | | |____ApolloClient.java
| | | |____ApolloPrefetch.java
| | | |____ApolloWatcher.java
| | | |____cache
| | | | |____http
| | | | | |____DiskLruCacheStore.java
| | | | | |____EvictionStrategy.java
| | | | | |____HttpCacheControl.java
| | | | | |____ResponseCacheRecord.java
| | | | | |____ResponseCacheRecordEditor.java
| | | | | |____ResponseCacheStore.java
| | | | | |____TimeoutEvictionStrategy.java
| | | | |____normalized
| | | | | |____CacheControl.java
| | | | | |____CacheKey.java
| | | | | |____CacheKeyResolver.java
| | | | | |____CacheReference.java
| | | | | |____CacheStore.java
| | | | | |____lru
| | | | | | |____EvictionPolicy.java
| | | | | | |____LruCacheStore.java
| | | | | |____Record.java
| | | | | |____RecordSet.java
| | | | | |____sql
| | | | | | |____ApolloSqlHelper.java
| | | | | | |____FieldsAdapter.java
| | | | | | |____SqlStore.java
| | | |____CustomTypeAdapter.java
| | | |____HttpException.java
| | | |____interceptor
| | | | |____ApolloInterceptor.java
| | | | |____ApolloInterceptorChain.java
| | | |____internal
| | | | |____cache
| | | | | |____http
| | | | | | |____CacheInterceptor.java
| | | | | | |____CacheResponseBody.java
| | | | | | |____HttpCache.java
| | | | | | |____ResponseBodyCacheSink.java
| | | | | | |____ResponseBodyProxy.java
| | | | | | |____ResponseHeaderRecord.java
| | | | | | |____Utils.java
| | | | | |____normalized
| | | | | | |____Cache.java
| | | | | | |____NoOpCache.java
| | | | | | |____ReadableCache.java
| | | | | | |____RealCache.java
| | | | | | |____RecordWeigher.java
| | | | | | |____ResponseNormalizer.java
| | | | | | |____Transaction.java
| | | | | | |____WriteableCache.java
| | | | |____field
| | | | | |____CacheFieldValueResolver.java
| | | | | |____FieldValueResolver.java
| | | | | |____MapFieldValueResolver.java
| | | | |____interceptor
| | | | | |____ApolloCacheInterceptor.java
| | | | | |____ApolloParseInterceptor.java
| | | | | |____ApolloServerInterceptor.java
| | | | | |____HttpResponseBodyParser.java
| | | | | |____RealApolloInterceptorChain.java
| | | | |____json
| | | | | |____ApolloJsonReader.java
| | | | | |____BufferedSourceJsonReader.java
| | | | | |____CacheJsonStreamReader.java
| | | | | |____JsonReader.java
| | | | | |____JsonScope.java
| | | | | |____ResponseJsonStreamReader.java
| | | | |____reader
| | | | | |____RealResponseReader.java
| | | | | |____ResponseReaderShadow.java
| | | | |____RealApolloCall.java
| | | | |____RealApolloPrefetch.java
| | | | |____RealApolloWatcher.java
| | | | |____util
| | | | | |____ApolloLogger.java
| | | | | |____Cancelable.java
| | | | | |____SimpleStack.java
| | | |____json
| | | | |____JsonDataException.java
| | | | |____JsonEncodingException.java
| | | |____Logger.java

Copy link
Contributor

@BenSchwab BenSchwab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot cleaner, thanks!

Copy link
Contributor

@marwanad marwanad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks neat.

Since those are breaking changes, I think we should be doing an 0.2.2 release first then merge that after to be part of 0.3.0 snapshot?

@@ -1,13 +1,13 @@
GROUP=com.apollographql.android
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're good to change that to com.apollographql according to https://issues.sonatype.org/browse/OSSRH-27585

@@ -25,6 +25,7 @@ class ApolloPlugin implements Plugin<Project> {
private static final String NODE_VERSION = "6.7.0"
public static final String TASK_GROUP = "apollo"
private static final String APOLLO_DEP_GROUP = "com.apollographql.android"
//TODO change this to apollo-runtime when it will be published
Copy link
Contributor

@marwanad marwanad Mar 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue pls

I think the better approach would be to comment out the line that adds the runtime dependency and disable the plugin tests.

It's better to not package that artifact at all instead of packaging the wrong one.

@@ -1,4 +1,4 @@
POM_ARTIFACT_ID=RxSupport
POM_ARTIFACT_ID=apollo-rx-support
POM_NAME=ApolloStack RxSupport
Copy link
Contributor

@marwanad marwanad Mar 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated but Apollo GraphQL RxSupport?

Same for other gradle.properties

@@ -5,8 +5,4 @@
/** TODO **/
public interface ResponseReader {
<T> T read(Field field) throws IOException;

interface ValueHandler {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happened to interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not used, legacy (forgot to remove when we refactored response readers)

@digitalbuddha
Copy link
Contributor

Lgtm

@@ -14,7 +14,7 @@ jdk:
- oraclejdk8

script:
- ./gradlew clean build connectedCheck -x checkstyleTest --stacktrace
- ./gradlew clean build connectedCheck -x checkstyleTest -x :apollo-integration:compileDebugUnitTestJavaWithJavac -x :apollo-integration:compileReleaseUnitTestJavaWithJavac --stacktrace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do -Dapollographql.skipRuntimeDep=true -x apollo-gradle-plugin:test faster than commenting out next time 😀

@sav007 sav007 merged commit c5bfbaa into apollographql:master Mar 30, 2017
@sav007 sav007 deleted the feature-250/refactor-package branch March 30, 2017 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants